summaryrefslogtreecommitdiff
path: root/config/routes
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-08-05 15:06:02 +0000
committerIgor <idrozdov@gitlab.com>2019-08-05 15:06:02 +0000
commit7efb062c3c3c7b44113d0dc0fe78fc9b8e95bd7c (patch)
treea12bde9bbeffcc0c365d3a29339d0389dcefdd8f /config/routes
parent2bd1320f86b8cfd5d60199c5f7f0caa1cc2aa66b (diff)
parent3dfc89ade452ad7f0185653b30ed1d4bb2544fb0 (diff)
downloadgitlab-ce-id-test-codeowners.tar.gz
Merge branch 'master' into 'id-test-codeowners'id-test-codeowners
# Conflicts: # .gitlab/CODEOWNERS
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/admin.rb2
-rw-r--r--config/routes/git_http.rb12
-rw-r--r--config/routes/project.rb10
3 files changed, 18 insertions, 6 deletions
diff --git a/config/routes/admin.rb b/config/routes/admin.rb
index f609739d9fd..6f9a5552564 100644
--- a/config/routes/admin.rb
+++ b/config/routes/admin.rb
@@ -73,7 +73,7 @@ namespace :admin do
resource :background_jobs, controller: 'background_jobs', only: [:show]
resource :system_info, controller: 'system_info', only: [:show]
- resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ }
+ resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.(html|txt)/ }
resources :projects, only: [:index]
diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb
index a959d40881b..aac6d418a92 100644
--- a/config/routes/git_http.rb
+++ b/config/routes/git_http.rb
@@ -34,6 +34,18 @@ scope(path: '*namespace_id/:project_id',
end
end
+ # Redirect /group/project.wiki.git to the project wiki
+ scope(format: true, constraints: { project_id: Gitlab::PathRegex.project_wiki_git_route_regex, format: :git }) do
+ wiki_redirect = redirect do |params, request|
+ project_id = params[:project_id].delete_suffix('.wiki')
+ path = [params[:namespace_id], project_id, 'wikis'].join('/')
+ path << "?#{request.query_string}" unless request.query_string.blank?
+ path
+ end
+
+ get '/', to: wiki_redirect
+ end
+
# Redirect /group/project/info/refs to /group/project.git/info/refs
scope(constraints: { project_id: Gitlab::PathRegex.project_route_regex }) do
# Allow /info/refs, /info/refs?service=git-upload-pack, and
diff --git a/config/routes/project.rb b/config/routes/project.rb
index c202463dadb..3113cb172f7 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -339,11 +339,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resource :variables, only: [:show, :update]
- resources :triggers, only: [:index, :create, :edit, :update, :destroy] do
- member do
- post :take_ownership
- end
- end
+ resources :triggers, only: [:index, :create, :edit, :update, :destroy]
resource :mirror, only: [:show, :update] do
member do
@@ -504,6 +500,10 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :realtime_changes
post :create_merge_request
get :discussions, format: :json
+
+ Gitlab.ee do
+ get 'designs(/*vueroute)', to: 'issues#show', format: false
+ end
end
collection do