Skip to content
代码片段 群组 项目
提交 79fc9f2b 编辑于 作者: Stan Hu's avatar Stan Hu 提交者: Ash McKenzie
浏览文件

Omit trailing slash when proxying pre-authorized routes with no suffix

In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56731, we
pulled in the upstream reverse proxy code to rebase a suffix onto a URL
(e.g. `/api/v4/uploads` -> `/api/v4/uploads/authorize`).

In the case of `info/refs`, `git-upload-pack`, etc. no suffix is added
for the authorization endpoint. The changes in that merge request would
cause Workhorse to append a trailing slash when proxying the request to
Rails. However, in https://gitlab.com/gitlab-org/gitlab/-/issues/330787,
this broke Geo maintenance mode since the middleware did not strip the
trailing slash.

To fix this, we restore the behavior and omit the trailing slash if no
pre-authorize suffix is provided. The absence or present of a trailing
slash usually does not cause a material difference, but we might as well
preserve the format of the original request.

Changelog: fixed
上级 29c0e30f
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册