Commit eb926dd3 authored by Sean Arnold's avatar Sean Arnold Committed by Alessio Caiazza

Move metric image upload path and change type

Add spec
parent 61ea14fc
---
title: Add direct upload acceleration for metric images
merge_request: 653
author:
type: added
......@@ -267,6 +267,9 @@ func (u *upstream) configureRoutes() {
// Group Import via UI upload acceleration
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
u.route("", apiPattern, proxy),
u.route("", ciAPIPattern, proxy),
......
......@@ -120,6 +120,7 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/import/gitlab_project`, true},
{"POST", `/import/gitlab_group`, true},
{"POST", `/api/v4/projects/9001/packages/pypi`, true},
{"POST", `/api/v4/projects/9001/issues/30/metric_images`, 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