summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-22 18:08:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-22 18:08:47 +0000
commit7105e0c53e2af43bda34e69155599c3a5af4cc13 (patch)
treea945a0d754d9e7dc7517d253b77d7b14d6a94e54 /config/routes.rb
parente829ca213b25b49faa619c0363059c6ed0a5a112 (diff)
downloadgitlab-ce-7105e0c53e2af43bda34e69155599c3a5af4cc13.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 598a52cddb3..83db7ff8d4c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -262,6 +262,14 @@ Rails.application.routes.draw do
draw :user
draw :project
+ # Serve snippet routes under /-/snippets.
+ # To ensure an old unscoped routing is used for the UI we need to
+ # add prefix 'as' to the scope routing and place it below original routing.
+ # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/210024
+ scope '-', as: :scoped do
+ draw :snippets
+ end
+
root to: "root#index"
get '*unmatched_route', to: 'application#route_not_found'