From 46ad7fea9d67631f54dd1ef45114a08cd2c5db73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Mar 2022 09:23:53 +0100 Subject: Bump rack-attack from 6.5.0 to 6.6.0 (#17405) * Bump rack-attack from 6.5.0 to 6.6.0 Bumps [rack-attack](https://github.com/rack/rack-attack) from 6.5.0 to 6.6.0. - [Release notes](https://github.com/rack/rack-attack/releases) - [Changelog](https://github.com/rack/rack-attack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack-attack/compare/v6.5.0...v6.6.0) --- updated-dependencies: - dependency-name: rack-attack dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix usage of deprecated API Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eugen Rochko --- config/initializers/rack_attack.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/initializers') 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', -- cgit