diff options
Diffstat (limited to 'lib/gitlab/etag_caching')
-rw-r--r-- | lib/gitlab/etag_caching/middleware.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/etag_caching/middleware.rb b/lib/gitlab/etag_caching/middleware.rb index 8c916375a98..d5bf0cffb1e 100644 --- a/lib/gitlab/etag_caching/middleware.rb +++ b/lib/gitlab/etag_caching/middleware.rb @@ -67,10 +67,11 @@ module Gitlab add_instrument_for_cache_hit(status_code, route, request) + Gitlab::ApplicationContext.push(feature_category: route.feature_category) + new_headers = { 'ETag' => etag, - 'X-Gitlab-From-Cache' => 'true', - ::Gitlab::Metrics::RequestsRackMiddleware::FEATURE_CATEGORY_HEADER => route.feature_category + 'X-Gitlab-From-Cache' => 'true' } [status_code, new_headers, []] |