about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-03-12 20:54:13 +0100
committerGitHub <noreply@github.com>2022-03-12 20:54:13 +0100
commit988f5bf0266483659b03f1b0926d0b9ff9e85a8f (patch)
tree1e0a0011a890729f45c0d364641c266864e78d02 /config/initializers
parent2c8bb1745359a3bf200d37383dc56d5951e2b6bc (diff)
parent8d4b5ee3ef5e8df3a92e19f2c3f3a4560341eef3 (diff)
Merge pull request #1716 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/rack_attack.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb
index c3733e377..745eb5d3b 100644
--- a/config/initializers/rack_attack.rb
+++ b/config/initializers/rack_attack.rb
@@ -118,9 +118,9 @@ class Rack::Attack
     req.session[:attempt_user_id] || req.params.dig('user', 'email').presence if req.post? && req.path == '/auth/sign_in'
   end
 
-  self.throttled_response = lambda do |env|
+  self.throttled_responder = lambda do |request|
     now        = Time.now.utc
-    match_data = env['rack.attack.match_data']
+    match_data = request.env['rack.attack.match_data']
 
     headers = {
       'Content-Type'          => 'application/json',