Bump the limit up.
parent
208e50d507
commit
e8e8f4e52f
|
@ -1,16 +1,8 @@
|
|||
class Rack::Attack
|
||||
### Throttle Spammy Clients ###
|
||||
throttle('req/ip', limit: 100, period: 1.minutes) do |req|
|
||||
throttle('req/ip', limit: 1000, period: 1.minutes) do |req|
|
||||
req.ip
|
||||
end
|
||||
|
||||
### Prevent Brute-Force Login Attacks ###
|
||||
# Throttle requests to /sign_in by IP address
|
||||
throttle('logins/ip', limit: 5, period: 20.seconds) do |req|
|
||||
if req.path.include?('/sign_in') && req.post?
|
||||
req.ip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Always allow requests from localhost
|
||||
|
|
Loading…
Reference in New Issue