BigW Consortium Gitlab

Commit f20949a3 by 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,8 +25,8 @@ module Gitlab ...@@ -25,8 +25,8 @@ 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
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