Commit 8e5a2a59 authored by George Koltsov's avatar George Koltsov

Add route for group imports direct upload

parent 3a34323b
...@@ -215,6 +215,7 @@ func (u *upstream) configureRoutes() { ...@@ -215,6 +215,7 @@ func (u *upstream) configureRoutes() {
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status // Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
route("POST", apiPattern+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy), route("POST", apiPattern+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy),
route("POST", apiPattern+`graphql\z`, uploadAccelerateProxy), route("POST", apiPattern+`graphql\z`, uploadAccelerateProxy),
route("POST", apiPattern+`v4/groups/import`, upload.Accelerate(api, signingProxy)),
// Explicitly proxy API requests // Explicitly proxy API requests
route("", apiPattern, proxy), route("", apiPattern, proxy),
......
...@@ -136,6 +136,7 @@ func TestAcceleratedUpload(t *testing.T) { ...@@ -136,6 +136,7 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/api/v4/projects/1/wikis/attachments`, false}, {"POST", `/api/v4/projects/1/wikis/attachments`, false},
{"POST", `/api/graphql`, false}, {"POST", `/api/graphql`, false},
{"PUT", "/api/v4/projects/9001/packages/nuget/v1/files", true}, {"PUT", "/api/v4/projects/9001/packages/nuget/v1/files", true},
{"POST", `/api/v4/groups/import`, true},
} }
for _, tt := range tests { for _, tt := range tests {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment