summaryrefslogtreecommitdiff
path: root/lib/gitlab/etag_caching
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-02 20:32:02 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-02 20:32:02 +0200
commit0383b4822562005e20cdda80bca20a5fc11e9f8f (patch)
tree9f6bdaea50d256ecf58f9ccfd49198019897a196 /lib/gitlab/etag_caching
parentb24651826f249cd1fcbd87d097c42488d0472611 (diff)
parent11852e16387790c26be7b8d1dd99ed689bf9d45b (diff)
downloadgitlab-ce-0383b4822562005e20cdda80bca20a5fc11e9f8f.tar.gz
Merge remote-tracking branch 'origin/master' into zj-job-view-goes-real-time
Diffstat (limited to 'lib/gitlab/etag_caching')
-rw-r--r--lib/gitlab/etag_caching/router.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb
index 53f3f442bc3..ca49eda51fb 100644
--- a/lib/gitlab/etag_caching/router.rb
+++ b/lib/gitlab/etag_caching/router.rb
@@ -10,10 +10,10 @@ module Gitlab
# - 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 builds
- new].freeze
-
+ 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),
@@ -46,6 +46,10 @@ module Gitlab
Gitlab::EtagCaching::Router::Route.new(
%r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/builds/\d+\.json\z),
'project_build'
+ ),
+ Gitlab::EtagCaching::Router::Route.new(
+ %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/environments\.json\z),
+ 'environments'
)
].freeze