diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-03 00:12:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-03 00:12:31 +0300 |
commit | a88ffaad9f9f321a71657ac0aca4d947f5bc6a5b (patch) | |
tree | c4baeb79c24082ea806b8ce4f27fcc94903b742e /lib/gitlab/rack_attack.rb | |
parent | 3c4d101de003ea292be5ac5baf5d73c6c2747367 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/rack_attack.rb')
-rw-r--r-- | lib/gitlab/rack_attack.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/gitlab/rack_attack.rb b/lib/gitlab/rack_attack.rb index b647965bb22..d999b706d6c 100644 --- a/lib/gitlab/rack_attack.rb +++ b/lib/gitlab/rack_attack.rb @@ -19,7 +19,7 @@ module Gitlab [429, { 'Content-Type' => 'text/plain' }.merge(throttled_headers), [Gitlab::Throttle.rate_limiting_response_text]] end - rack_attack.cache.store = cache_store + rack_attack.cache.store = Gitlab::RackAttack::Store.new # Configure the throttles configure_throttles(rack_attack) @@ -27,14 +27,6 @@ module Gitlab configure_user_allowlist end - def self.cache_store - if ENV['GITLAB_RACK_ATTACK_NEW_STORE'] == '1' - Gitlab::RackAttack::Store.new - else - Gitlab::RackAttack::InstrumentedCacheStore.new - end - end - # Rate Limit HTTP headers are not standardized anywhere. This is the latest # draft submitted to IETF: # https://github.com/ietf-wg-httpapi/ratelimit-headers/blob/main/draft-ietf-httpapi-ratelimit-headers.md |