diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-04 15:10:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-04 15:10:55 +0300 |
commit | f2fd07aa1c0bfb732b80c3d028cd23c91547991c (patch) | |
tree | 7b2c53ef4b4caddb65b2443ecd34dfa2289719ab /workhorse | |
parent | 9f0d27648937cb04d685ca9207f5c45f3ac98010 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse')
-rw-r--r-- | workhorse/internal/upstream/routes.go | 2 | ||||
-rw-r--r-- | workhorse/upload_test.go | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/workhorse/internal/upstream/routes.go b/workhorse/internal/upstream/routes.go index 08e3ef8c9f1..c47053ad682 100644 --- a/workhorse/internal/upstream/routes.go +++ b/workhorse/internal/upstream/routes.go @@ -52,6 +52,7 @@ const ( geoGitProjectPattern = `^/[^-].+\.git/` // Prevent matching routes like /-/push_from_secondary projectPattern = `^/([^/]+/){1,}[^/]+/` apiProjectPattern = apiPattern + `v4/projects/[^/]+` // API: Projects can be encoded via group%2Fsubgroup%2Fproject + apiGroupPattern = apiPattern + `v4/groups/[^/]+` apiTopicPattern = apiPattern + `v4/topics` snippetUploadPattern = `^/uploads/personal_snippet` userUploadPattern = `^/uploads/user` @@ -303,6 +304,7 @@ func configureRoutes(u *upstream) { // we need to declare each routes until we have fixed all the routes on the rails codebase. // Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status u.route("POST", apiProjectPattern+`/wikis/attachments\z`, tempfileMultipartProxy), + u.route("POST", apiGroupPattern+`/wikis/attachments\z`, tempfileMultipartProxy), u.route("POST", apiPattern+`graphql\z`, tempfileMultipartProxy), u.route("POST", apiTopicPattern, tempfileMultipartProxy), u.route("PUT", apiTopicPattern, tempfileMultipartProxy), diff --git a/workhorse/upload_test.go b/workhorse/upload_test.go index c7e5888cec9..22abed25928 100644 --- a/workhorse/upload_test.go +++ b/workhorse/upload_test.go @@ -138,6 +138,8 @@ func TestAcceleratedUpload(t *testing.T) { {"POST", `/api/v4/groups`, false}, {"PUT", `/api/v4/groups/5`, false}, {"PUT", `/api/v4/groups/group%2Fsubgroup`, false}, + {"POST", `/api/v4/groups/1/wikis/attachments`, false}, + {"POST", `/api/v4/groups/my%2Fsubgroup/wikis/attachments`, false}, {"POST", `/api/v4/users`, false}, {"PUT", `/api/v4/users/42`, false}, {"PUT", "/api/v4/projects/9001/packages/nuget/v1/files", true}, |