mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Explain why Rack::Attack returns 503 instead of 429 in README
This commit is contained in:
parent
eaaad929b1
commit
d05da7d39b
1 changed files with 2 additions and 0 deletions
|
|
@ -186,6 +186,8 @@ For responses that did not exceed a throttle limit, Rack::Attack annotates the e
|
|||
request.env['rack.attack.throttle_data'][name] # => { :count => n, :period => p, :limit => l }
|
||||
```
|
||||
|
||||
Note that Rack::Attack uses 503 Service Unavailable by default instead of 429 Too Many Requests for throttling because it may make attacker think that they have successfully DOSed the site.
|
||||
|
||||
## Logging & Instrumentation
|
||||
|
||||
Rack::Attack uses the [ActiveSupport::Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) API if available.
|
||||
|
|
|
|||
Loading…
Reference in a new issue