Merge pull request #37 from mjelks/master

Update README.md
This commit is contained in:
Aaron Suggs 2013-11-06 14:25:34 -08:00
commit 9538d3156f

View file

@ -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.
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.
req.path = '/login' and req.method == 'post'
req.path == '/login' and req.post?
end
end
```