Fix incorrect rate limit on PUT requests (#31356)
This commit is contained in:
parent
d673b6e920
commit
67b38a5d64
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ class Rack::Attack
|
||||||
end
|
end
|
||||||
|
|
||||||
throttle('throttle_password_change/account', limit: 10, period: 10.minutes) do |req|
|
throttle('throttle_password_change/account', limit: 10, period: 10.minutes) do |req|
|
||||||
req.warden_user_id if req.put? || (req.patch? && req.path_matches?('/auth'))
|
req.warden_user_id if (req.put? || req.patch?) && (req.path_matches?('/auth') || req.path_matches?('/auth/password'))
|
||||||
end
|
end
|
||||||
|
|
||||||
self.throttled_responder = lambda do |request|
|
self.throttled_responder = lambda do |request|
|
||||||
|
|
Loading…
Reference in a new issue