Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-13 12:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-13 12:08:03 +0300
commitc3ad57034cc1cbd6d0ad02de7ac57f6004440c83 (patch)
treeb27a4424d2d5d930ffdaf1ef872851ce691d4e7a /config
parent6ede90f5dd63d4a1f5ba243b4ed5097bb1a0acab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/routes/group.rb2
-rw-r--r--config/routes/project.rb2
-rw-r--r--config/routes/uploads.rb6
3 files changed, 6 insertions, 4 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 30671d4e0a1..24957d5ecef 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -68,7 +68,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources :uploads, only: [:create] do
collection do
- get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} }
+ get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} }, format: false, defaults: { format: nil }
post :authorize
end
end
diff --git a/config/routes/project.rb b/config/routes/project.rb
index b420f07c7a1..3bc38ef3349 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -452,7 +452,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources :uploads, only: [:create] do
collection do
- get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} }
+ get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} }, format: false, defaults: { format: nil }
post :authorize
end
end
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index 096ef146e07..fb8af76397c 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -21,9 +21,11 @@ scope path: :uploads do
as: 'appearance_upload'
# Project markdown uploads
+ # DEPRECATED: Remove this in GitLab 13.0 because this is redundant to show_namespace_project_uploads
+ # https://gitlab.com/gitlab-org/gitlab/issues/196396
get ":namespace_id/:project_id/:secret/:filename",
- to: "projects/uploads#show",
- constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }
+ to: redirect("%{namespace_id}/%{project_id}/uploads/%{secret}/%{filename}"),
+ constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil }
# create uploads for models, snippets (notes) available for now
post ':model',