From 7036f75f6710d5b2cb188864c3c75e06721a755f Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 25 Dec 2018 00:24:00 -0800 Subject: Use system paths for appearance logos When object storage is enabled, the logos used to customize a GitLab appearance causes the time-limited URLs to be used. We fix this by forcing all of these URLs to use the /uploads/-/system prefix so that they will always be proxied through GitLab. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6778 --- config/routes/uploads.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/routes') diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index 6becadd57ae..b594f55f8a0 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -17,7 +17,8 @@ scope path: :uploads do # Appearance get "-/system/:model/:mounted_as/:id/:filename", to: "uploads#show", - constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ } + constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ }, + as: 'appearance_upload' # Project markdown uploads get ":namespace_id/:project_id/:secret/:filename", -- cgit v1.2.1