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
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/project.rb')
-rw-r--r--config/routes/project.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 7f0e056c884..d05fe11f233 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -281,8 +281,13 @@ constraints(ProjectUrlConstrainer.new) do
namespace :registry do
resources :repository, only: [] do
- resources :tags, only: [:index, :destroy],
- constraints: { id: Gitlab::Regex.container_registry_tag_regex }
+ # We default to JSON format in the controller to avoid ambiguity.
+ # `latest.json` could either be a request for a tag named `latest`
+ # in JSON format, or a request for tag named `latest.json`.
+ scope format: false do
+ resources :tags, only: [:index, :destroy],
+ constraints: { id: Gitlab::Regex.container_registry_tag_regex }
+ end
end
end