diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-06-01 20:38:46 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-06-01 20:38:46 +0000 |
commit | 8d131eb85ddc1ee6cd4a27830b2607617d767f28 (patch) | |
tree | ec42e6d1ea049de36c21de8b3017988963bd5289 /lib | |
parent | b92e3d746466667642fd99d1ed72b481488d1a9f (diff) | |
parent | 696b0395116f9f973c919b281a1a5df023f22084 (diff) | |
download | gitlab-ce-8d131eb85ddc1ee6cd4a27830b2607617d767f28.tar.gz |
Merge branch 'zj-realtime-env-list' into 'master'
Realtime env list
Closes #31701
See merge request !11333
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/etag_caching/router.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb index d137cc1bae6..2f9d8bfc266 100644 --- a/lib/gitlab/etag_caching/router.rb +++ b/lib/gitlab/etag_caching/router.rb @@ -9,9 +9,11 @@ module Gitlab # - Ending in `noteable/issue/<id>/notes` for the `issue_notes` route # - Ending in `issues/id`/realtime_changes` for the `issue_title` route USED_IN_ROUTES = %w[noteable issue notes issues realtime_changes - commit pipelines merge_requests new].freeze + commit pipelines merge_requests new + environments].freeze 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), @@ -40,6 +42,10 @@ module Gitlab Gitlab::EtagCaching::Router::Route.new( %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/pipelines/\d+\.json\z), 'project_pipeline' + ), + Gitlab::EtagCaching::Router::Route.new( + %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/environments\.json\z), + 'environments' ) ].freeze |