提交 f20949a3 编写于 作者: Z Z.J. van de Weg

Fix etag route misses

Fixes gitlab-org/gitlab-ce#33106
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册