mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
parent
a937df3789
commit
b32148e0be
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ A [Rack::Request](http://www.rubydoc.info/gems/rack/Rack/Request) object is pass
|
||||||
# (blacklist & throttles are skipped)
|
# (blacklist & throttles are skipped)
|
||||||
Rack::Attack.whitelist('allow from localhost') do |req|
|
Rack::Attack.whitelist('allow from localhost') do |req|
|
||||||
# Requests are allowed if the return value is truthy
|
# Requests are allowed if the return value is truthy
|
||||||
'127.0.0.1' == req.ip
|
'127.0.0.1' == req.ip || '::1' == req.ip
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue