also add a throttle
This commit is contained in:
parent
28ff2f6848
commit
4f9cb29775
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user