diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-10-19 11:28:29 +0000 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-10-19 13:55:58 +0000 |
commit | b3cc7385caf12d5d84b44b52529c13e60b5b030e (patch) | |
tree | 7ac306f14a536edf8983506f3ff2e169cf12d45e /config | |
parent | 415483fddb027a05f6a5bd0953b4bf05045bff1b (diff) | |
download | gitlab-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.rb | 9 |
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 |