Commit f20949a3 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Fix etag route misses

Fixes gitlab-org/gitlab-ce#33106
parent 6b3f6c9f
...@@ -209,7 +209,8 @@ class Environment < ActiveRecord::Base ...@@ -209,7 +209,8 @@ class Environment < ActiveRecord::Base
def etag_cache_key def etag_cache_key
Gitlab::Routing.url_helpers.namespace_project_environments_path( Gitlab::Routing.url_helpers.namespace_project_environments_path(
project.namespace, project.namespace,
project) project,
format: :json)
end end
private private
......
...@@ -25,7 +25,7 @@ module Gitlab ...@@ -25,7 +25,7 @@ module Gitlab
end end
def redis_key(key) def redis_key(key)
raise 'Invalid key' unless Gitlab::EtagCaching::Router.match(key) raise 'Invalid key' if !Rails.env.production? && !Gitlab::EtagCaching::Router.match(key)
"#{REDIS_NAMESPACE}#{key}" "#{REDIS_NAMESPACE}#{key}"
end end
......
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