diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-12 11:51:25 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-03-12 11:51:25 +0100 |
commit | bb9a6fb5c239f4846e2e20c8435edb46f0c7c548 (patch) | |
tree | 2f6120abc31a698b1e1a7dbf442383a79d42ee77 /config/initializers | |
parent | 2c8bb1745359a3bf200d37383dc56d5951e2b6bc (diff) | |
parent | d3aa9cf7744eede43c5c1b9097eb1f0720185ccd (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/rack_attack.rb | 4 |
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', |