Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-12 00:09:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-12 00:09:26 +0300
commitd9f75cd50b9c47aad9d02036a4669041b59f67f0 (patch)
treecb0615fbb2aaab077b99255fd93f19eb5c84cd9a /lib/gitlab/rack_attack
parent5da842297dfad0ce52724aa4fd7f19b1307b7a11 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/rack_attack')
-rw-r--r--lib/gitlab/rack_attack/instrumented_cache_store.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/gitlab/rack_attack/instrumented_cache_store.rb b/lib/gitlab/rack_attack/instrumented_cache_store.rb
index b84e41685b5..d8beb259fba 100644
--- a/lib/gitlab/rack_attack/instrumented_cache_store.rb
+++ b/lib/gitlab/rack_attack/instrumented_cache_store.rb
@@ -15,18 +15,7 @@ module Gitlab
delegate :silence!, :mute, to: :@upstream_store
- # Clean up in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1249
- def self.store
- if ENV['USE_RATE_LIMITING_STORE_FOR_RACK_ATTACK'] == '1'
- Gitlab::AuthLogger.info(message: 'Rack::Attack using rate limiting store')
- ::Gitlab::Redis::RateLimiting.cache_store
- else
- Gitlab::AuthLogger.info(message: 'Rack::Attack using cache store')
- ::Rails.cache
- end
- end
-
- def initialize(upstream_store: self.class.store, notifier: ActiveSupport::Notifications)
+ def initialize(upstream_store: ::Gitlab::Redis::RateLimiting.cache_store, notifier: ActiveSupport::Notifications)
@upstream_store = upstream_store
@notifier = notifier
end