summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-10-19 11:28:29 +0000
committerWinnie Hellmann <winnie@gitlab.com>2017-10-19 13:55:58 +0000
commitb3cc7385caf12d5d84b44b52529c13e60b5b030e (patch)
tree7ac306f14a536edf8983506f3ff2e169cf12d45e /config
parent415483fddb027a05f6a5bd0953b4bf05045bff1b (diff)
downloadgitlab-ce-b3cc7385caf12d5d84b44b52529c13e60b5b030e.tar.gz
Merge branch 'sh-fix-broken-docker-delete' into 'master'
Fix inability to delete container registry tags Closes #39260 See merge request gitlab-org/gitlab-ce!14947 (cherry picked from commit 83f5955ee342af01cea7a9a2e18089a3de615a06) b7e35033 Fix inability to delete container registry tags de57492d Fix broken function invocation
Diffstat (limited to 'config')
-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