diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-25 12:09:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-25 12:09:19 +0000 |
commit | a156fc95eb8499fec9cd081d30629f0faf18bfe9 (patch) | |
tree | ff59d44794ba9d8084e4d59057ec9507b3ba8e2f /workhorse | |
parent | 618be8f52d6349533c709a1d702e45b84338c36a (diff) | |
download | gitlab-ce-a156fc95eb8499fec9cd081d30629f0faf18bfe9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse')
-rw-r--r-- | workhorse/internal/upstream/routes.go | 3 | ||||
-rw-r--r-- | workhorse/upload_test.go | 3 |
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}, |