Commit 32e9e24a authored by Sean McGivern's avatar Sean McGivern

Merge branch 'wildcard-routes-in-etag-middleware' into 'master'

Use NamespaceValidator::WILDCARD_ROUTES in ETag caching middleware

See merge request !10478
parents 7196adaa 63a6453c
module Gitlab module Gitlab
module EtagCaching module EtagCaching
class Middleware class Middleware
RESERVED_WORDS = ProjectPathValidator::RESERVED.map { |word| "/#{word}/" }.join('|') RESERVED_WORDS = NamespaceValidator::WILDCARD_ROUTES.map { |word| "/#{word}/" }.join('|')
ROUTE_REGEXP = Regexp.union( ROUTE_REGEXP = Regexp.union(
%r(^(?!.*(#{RESERVED_WORDS})).*/noteable/issue/\d+/notes\z) %r(^(?!.*(#{RESERVED_WORDS})).*/noteable/issue/\d+/notes\z)
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment