also add a throttle

This commit is contained in:
Konstantin Haase 2015-11-19 19:29:07 +01:00
parent 28ff2f6848
commit 4f9cb29775

View File

@ -59,6 +59,14 @@ class Rack::Attack
end end
end end
###
# Throttle: unauthenticated requests to /auth/github - 1 per minute
# Scoped by: IP address
throttle('req/ip/1min', limit: 1, period: 1.minute) do |request|
request.ip unless request.authenticated? and request.path == '/auth/github'
end
### ###
# Throttle: unauthenticated requests - 500 per minute # Throttle: unauthenticated requests - 500 per minute
# Scoped by: IP address # Scoped by: IP address