diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-16 12:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-16 12:09:37 +0300 |
commit | 513eff621044e77bc00cd1b4ae0cb5e0e7c2e77e (patch) | |
tree | 1de915ccc488a661129b410db83ad9f20a7c806c /config | |
parent | 1ab35c9208287638a097abc895738fbc0c0860e6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/routes/project.rb | 4 | ||||
-rw-r--r-- | config/routes/repository.rb | 3 | ||||
-rw-r--r-- | config/routes/repository_scoped.rb | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb index ab7c439318f..1ce889dd578 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -26,10 +26,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do scope '-' do get 'archive/*id', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive' - scope controller: :static_site_editor do - get '/sse/*id', action: :show, as: :show_sse - end - resources :artifacts, only: [:index, :destroy] resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do diff --git a/config/routes/repository.rb b/config/routes/repository.rb index 38d6cdbbaf8..eec204f2870 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -21,6 +21,9 @@ resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do end end +# NOTE: Add new routes to repository_scoped.rb instead (see +# https://docs.gitlab.com/ee/development/routing.html#project-routes). +# # Don't use format parameter as file extension (old 3.0.x behavior) # See http://guides.rubyonrails.org/routing.html#route-globbing-and-wildcard-segments scope format: false do diff --git a/config/routes/repository_scoped.rb b/config/routes/repository_scoped.rb index c6343039d62..42ec8ca1806 100644 --- a/config/routes/repository_scoped.rb +++ b/config/routes/repository_scoped.rb @@ -30,5 +30,11 @@ scope format: false do resources :protected_branches, only: [:index, :show, :create, :update, :destroy, :patch], constraints: { id: Gitlab::PathRegex.git_reference_regex } resources :protected_tags, only: [:index, :show, :create, :update, :destroy] + + scope constraints: { id: /[^\0]+/ } do + scope controller: :static_site_editor do + get '/sse/*id', action: :show, as: :show_sse + end + end end end |