summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-26 21:01:41 +0000
committerStan Hu <stanhu@gmail.com>2019-07-26 21:01:41 +0000
commit2219b140b6873b893a3cac2cae195b929a20f5aa (patch)
treef69b0064f5aa05e5225c6920709837873ee62b5f /lib/gitlab
parent195c85eb3a1fb9f904d2ade69a23f5d3c884f502 (diff)
parent634a03bf608eaf86ecf14b4f44fa30e62905ac6b (diff)
downloadgitlab-ce-2219b140b6873b893a3cac2cae195b929a20f5aa.tar.gz
Merge branch '19186-redirect-wiki-git-route-to-wiki' into 'master'
Redirect project.wiki.git to project wiki home See merge request gitlab-org/gitlab-ce!31085
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/path_regex.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/path_regex.rb b/lib/gitlab/path_regex.rb
index a13b3f9e069..f96466b2b00 100644
--- a/lib/gitlab/path_regex.rb
+++ b/lib/gitlab/path_regex.rb
@@ -175,6 +175,10 @@ module Gitlab
@project_git_route_regex ||= /#{project_route_regex}\.git/.freeze
end
+ def project_wiki_git_route_regex
+ @project_wiki_git_route_regex ||= /#{PATH_REGEX_STR}\.wiki/.freeze
+ end
+
def full_namespace_path_regex
@full_namespace_path_regex ||= %r{\A#{full_namespace_route_regex}/\z}
end