Bump the limit up.

pull/1006/head
Rick Carlino 2018-10-05 11:16:52 -05:00
parent 208e50d507
commit e8e8f4e52f
1 changed files with 1 additions and 9 deletions

View File

@ -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