Commit 26c9646c authored by Alessio Caiazza's avatar Alessio Caiazza

Merge branch 'sarnold-metric-image-upload-route' into 'master'

Add metric image upload route for acceleration

See merge request gitlab-org/gitlab-workhorse!653
parents 61ea14fc eb926dd3
---
title: Add direct upload acceleration for metric images
merge_request: 653
author:
type: added
...@@ -267,6 +267,9 @@ func (u *upstream) configureRoutes() { ...@@ -267,6 +267,9 @@ func (u *upstream) configureRoutes() {
// Group Import via UI upload acceleration // Group Import via UI upload acceleration
u.route("POST", importPattern+`gitlab_group`, upload.Accelerate(api, signingProxy, preparers.uploads)), u.route("POST", importPattern+`gitlab_group`, upload.Accelerate(api, signingProxy, preparers.uploads)),
// Metric image upload
u.route("POST", apiPattern+`v4/projects/[0-9]+/issues/[0-9]+/metric_images\z`, upload.Accelerate(api, signingProxy, preparers.uploads)),
// Explicitly proxy API requests // Explicitly proxy API requests
u.route("", apiPattern, proxy), u.route("", apiPattern, proxy),
u.route("", ciAPIPattern, proxy), u.route("", ciAPIPattern, proxy),
......
...@@ -120,6 +120,7 @@ func TestAcceleratedUpload(t *testing.T) { ...@@ -120,6 +120,7 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/import/gitlab_project`, true}, {"POST", `/import/gitlab_project`, true},
{"POST", `/import/gitlab_group`, true}, {"POST", `/import/gitlab_group`, true},
{"POST", `/api/v4/projects/9001/packages/pypi`, true}, {"POST", `/api/v4/projects/9001/packages/pypi`, true},
{"POST", `/api/v4/projects/9001/issues/30/metric_images`, 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