Commit 2e9fd811 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Add route for project imports direct upload

parent b04fe75d
......@@ -216,6 +216,7 @@ func (u *upstream) configureRoutes() {
route("POST", apiPattern+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy),
route("POST", apiPattern+`graphql\z`, uploadAccelerateProxy),
route("POST", apiPattern+`v4/groups/import`, upload.Accelerate(api, signingProxy)),
route("POST", apiPattern+`v4/projects/import`, upload.Accelerate(api, signingProxy)),
// Explicitly proxy API requests
route("", apiPattern, proxy),
......
......@@ -137,6 +137,7 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/api/graphql`, false},
{"PUT", "/api/v4/projects/9001/packages/nuget/v1/files", true},
{"POST", `/api/v4/groups/import`, true},
{"POST", `/api/v4/projects/import`, true},
}
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