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
def etag_cache_key
Gitlab::Routing.url_helpers.namespace_project_environments_path(
project.namespace,
project)
project,
format: :json)
end
private
......
......@@ -25,8 +25,8 @@ module Gitlab
end
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}"
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