mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-26 14:57:47 +00:00
commit
ba52e2ce15
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ end
|
||||||
```ruby
|
```ruby
|
||||||
# Block requests from 1.2.3.4
|
# Block requests from 1.2.3.4
|
||||||
Rack::Attack.blacklist('block 1.2.3.4') do |req|
|
Rack::Attack.blacklist('block 1.2.3.4') do |req|
|
||||||
# Request are blocked if the return value is truthy
|
# Requests are blocked if the return value is truthy
|
||||||
'1.2.3.4' == req.ip
|
'1.2.3.4' == req.ip
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue