Merge pull request #152 from ktheory/readme-ipv6-localhost

README: add ipv6 example
This commit is contained in:
Aaron Suggs 2015-11-30 10:09:42 -06:00
commit 6789b28c7b

View file

@ -104,7 +104,7 @@ A [Rack::Request](http://www.rubydoc.info/gems/rack/Rack/Request) object is pass
# (blacklist & throttles are skipped)
Rack::Attack.whitelist('allow from localhost') do |req|
# 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
```