Skip to content

Commit

Permalink
fix: Replace deprecated Rack::Attack.throttled_response with `Rack:…
Browse files Browse the repository at this point in the history
…:Attack.throttled_responder` (CircuitVerse#5352)

* Update rack_attack.rb

* Update rack_attack.rb
  • Loading branch information
gitsofaryan authored Jan 27, 2025
1 parent a9e4fcc commit bffb62b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def json_params
req.json_params["email"].to_s.downcase if req.path == "/api/v1/password/forgot" && req.post?
end

self.throttled_response = lambda do |_env|
self.throttled_responder = lambda do |_env|
[429, # status
{}, # headers
["Too many requests, please try again later"]] # body
Expand Down

0 comments on commit bffb62b

Please sign in to comment.