mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-26 14:57:47 +00:00
Fix typo 401 -> 429
This commit is contained in:
parent
8a0fd35880
commit
8ff22a17f9
1 changed files with 2 additions and 2 deletions
|
|
@ -166,7 +166,7 @@ Customize the response of blacklisted and throttled requests using an object tha
|
||||||
```ruby
|
```ruby
|
||||||
Rack::Attack.blacklisted_response = lambda do |env|
|
Rack::Attack.blacklisted_response = lambda do |env|
|
||||||
# Using 503 because it may make attacker think that they have successfully
|
# Using 503 because it may make attacker think that they have successfully
|
||||||
# DOSed the site, Rack::Attack returns 401 for blacklists by default
|
# DOSed the site. Rack::Attack returns 401 for blacklists by default
|
||||||
[ 503, {}, ['Blocked']]
|
[ 503, {}, ['Blocked']]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -179,7 +179,7 @@ Customize the response of blacklisted and throttled requests using an object tha
|
||||||
].inspect
|
].inspect
|
||||||
|
|
||||||
# Using 503 because it may make attacker think that they have successfully
|
# Using 503 because it may make attacker think that they have successfully
|
||||||
# DOSed the site, Rack::Attack returns 401 for blacklists by default
|
# DOSed the site. Rack::Attack returns 429 for throttling by default
|
||||||
[ 503, {}, [body]]
|
[ 503, {}, [body]]
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue