diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-01 10:31:33 +0200 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-01 10:31:33 +0200 |
commit | 00b00f1edee71d236b0cd5b796bb68f15142911f (patch) | |
tree | 471ef31c0c455abe44f04dcd7d2ba84e87f22be1 /lib/gitlab/etag_caching | |
parent | f4aa01053ed39a265ddfd9ee6e9618bd3406e59d (diff) | |
parent | dd0f8b8ccc3b5f61e31703f7391a919b702934a5 (diff) | |
download | gitlab-ce-00b00f1edee71d236b0cd5b796bb68f15142911f.tar.gz |
Merge branch 'master' into zj-realtime-env-list
Diffstat (limited to 'lib/gitlab/etag_caching')
-rw-r--r-- | lib/gitlab/etag_caching/router.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb index cf279628beb..2f9d8bfc266 100644 --- a/lib/gitlab/etag_caching/router.rb +++ b/lib/gitlab/etag_caching/router.rb @@ -11,8 +11,9 @@ module Gitlab USED_IN_ROUTES = %w[noteable issue notes issues realtime_changes commit pipelines merge_requests new environments].freeze - RESERVED_WORDS = Gitlab::Regex::ILLEGAL_PROJECT_PATH_WORDS - USED_IN_ROUTES - RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS) + RESERVED_WORDS = Gitlab::PathRegex::ILLEGAL_PROJECT_PATH_WORDS - USED_IN_ROUTES + RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS.map(&Regexp.method(:escape))) + ROUTES = [ Gitlab::EtagCaching::Router::Route.new( %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/noteable/issue/\d+/notes\z), |