Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-11-30 18:08:56 +0300
committerNick Thomas <nick@gitlab.com>2018-11-30 18:08:56 +0300
commit93d6f56968f49d1c91dd73ddd25745ee781e9486 (patch)
treecc67696c0c3242a5587dda3109bfc4bb5201a03e /lib/api/api.rb
parent55447c09f96e7a1cfdb5f563c83ccfb5f14934dd (diff)
parentb1e070bf4957a558ac51315dd4a6277056047e8a (diff)
Merge branch 'if-52811-fix_namespaces_api_routing' into 'master'
Fix API::Namespaces routing to accept namepaces with dots See merge request gitlab-org/gitlab-ce!22912
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 449faf5f8da..a4bf0d77eb1 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -7,8 +7,8 @@ module API
LOG_FILENAME = Rails.root.join("log", "api_json.log")
NO_SLASH_URL_PART_REGEX = %r{[^/]+}
- PROJECT_ENDPOINT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze
- COMMIT_ENDPOINT_REQUIREMENTS = PROJECT_ENDPOINT_REQUIREMENTS.merge(sha: NO_SLASH_URL_PART_REGEX).freeze
+ NAMESPACE_OR_PROJECT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze
+ COMMIT_ENDPOINT_REQUIREMENTS = NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(sha: NO_SLASH_URL_PART_REGEX).freeze
insert_before Grape::Middleware::Error,
GrapeLogging::Middleware::RequestLogger,