Skip to content
Snippets Groups Projects
Commit f20949a3 authored by Z.J. van de Weg's avatar Z.J. van de Weg
Browse files

Fix etag route misses

Fixes gitlab-org/gitlab-ce#33106
parent 6b3f6c9f
No related branches found
No related tags found
2 merge requests!14773Maxraab master patch 51809,!12084Raise etag route regex miss
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment