diff --git a/lib/travis/api/attack.rb b/lib/travis/api/attack.rb index 66679446..dc0a247d 100644 --- a/lib/travis/api/attack.rb +++ b/lib/travis/api/attack.rb @@ -59,6 +59,14 @@ class Rack::Attack 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 # Scoped by: IP address