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.
This commit is contained in:
parent
d4349ba6c4
commit
63a6453c01
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue