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:
authorAdam Niedzielski <adamsunday@gmail.com>2017-04-05 16:48:05 +0300
committerAdam Niedzielski <adamsunday@gmail.com>2017-04-05 16:48:05 +0300
commit63a6453c0136a6244b0351ab6350dcee62a45cf9 (patch)
treeabd9eb8a154091a8d97d10cb0c9f797eec2e6efa /lib/gitlab/etag_caching
parentd4349ba6c4960f50dce7b0beec5f309894dbada9 (diff)
Use NamespaceValidator::WILDCARD_ROUTES in ETag caching middleware
NamespaceValidator::WILDCARD_ROUTES is less restrictive than ProjectPathValidator::RESERVED and we really have to avoid only routes that contain wildcard names.
Diffstat (limited to 'lib/gitlab/etag_caching')
-rw-r--r--lib/gitlab/etag_caching/middleware.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/etag_caching/middleware.rb b/lib/gitlab/etag_caching/middleware.rb
index 9c98f0d1a30..ab8dfc67880 100644
--- a/lib/gitlab/etag_caching/middleware.rb
+++ b/lib/gitlab/etag_caching/middleware.rb
@@ -1,7 +1,7 @@
module Gitlab
module EtagCaching
class Middleware
- RESERVED_WORDS = ProjectPathValidator::RESERVED.map { |word| "/#{word}/" }.join('|')
+ RESERVED_WORDS = NamespaceValidator::WILDCARD_ROUTES.map { |word| "/#{word}/" }.join('|')
ROUTE_REGEXP = Regexp.union(
%r(^(?!.*(#{RESERVED_WORDS})).*/noteable/issue/\d+/notes\z)
)