summaryrefslogtreecommitdiff
path: root/workhorse
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-25 12:09:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-25 12:09:19 +0000
commita156fc95eb8499fec9cd081d30629f0faf18bfe9 (patch)
treeff59d44794ba9d8084e4d59057ec9507b3ba8e2f /workhorse
parent618be8f52d6349533c709a1d702e45b84338c36a (diff)
downloadgitlab-ce-a156fc95eb8499fec9cd081d30629f0faf18bfe9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse')
-rw-r--r--workhorse/internal/upstream/routes.go3
-rw-r--r--workhorse/upload_test.go3
2 files changed, 6 insertions, 0 deletions
diff --git a/workhorse/internal/upstream/routes.go b/workhorse/internal/upstream/routes.go
index b77cb06d1d0..d95646b91f7 100644
--- a/workhorse/internal/upstream/routes.go
+++ b/workhorse/internal/upstream/routes.go
@@ -302,6 +302,9 @@ func configureRoutes(u *upstream) {
// Requirements Import via UI upload acceleration
u.route("POST", projectPattern+`requirements_management/requirements/import_csv`, upload.Accelerate(api, signingProxy, preparers.uploads)),
+ // Uploads via API
+ u.route("POST", apiProjectPattern+`uploads\z`, upload.Accelerate(api, signingProxy, preparers.uploads)),
+
// Explicitly proxy API requests
u.route("", apiPattern, proxy),
u.route("", ciAPIPattern, proxy),
diff --git a/workhorse/upload_test.go b/workhorse/upload_test.go
index fdd4605dbc4..90712c0af72 100644
--- a/workhorse/upload_test.go
+++ b/workhorse/upload_test.go
@@ -116,6 +116,9 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/example`, false},
{"POST", `/uploads/personal_snippet`, true},
{"POST", `/uploads/user`, true},
+ {"POST", `/api/v4/projects/1/uploads`, true},
+ {"POST", `/api/v4/projects/group%2Fproject/uploads`, true},
+ {"POST", `/api/v4/projects/group%2Fsubgroup%2Fproject/uploads`, true},
{"POST", `/api/v4/projects/1/wikis/attachments`, false},
{"POST", `/api/v4/projects/group%2Fproject/wikis/attachments`, false},
{"POST", `/api/v4/projects/group%2Fsubgroup%2Fproject/wikis/attachments`, false},