mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-26 14:57:47 +00:00
Update README.md
Appears to be error with documentation and Allow2Ban portion. Caused local errors with '.path= is undefined'
This commit is contained in:
parent
4a9222e03a
commit
df276e6dfa
1 changed files with 1 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ Rack::Attack.blacklist('allow2ban login scrapers') do |req|
|
||||||
# they hit the limit. At that point, filter will return true and block.
|
# they hit the limit. At that point, filter will return true and block.
|
||||||
Rack::Attack::Allow2Ban.filter(req.ip, :maxretry => 20, :findtime => 1.minute, :bantime => 1.hour) do
|
Rack::Attack::Allow2Ban.filter(req.ip, :maxretry => 20, :findtime => 1.minute, :bantime => 1.hour) do
|
||||||
# The count for the IP is incremented if the return value is truthy.
|
# The count for the IP is incremented if the return value is truthy.
|
||||||
req.path = '/login' and req.method == 'post'
|
req.path == '/login' and req.post?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue