remove hard coded request path

This commit is contained in:
carlad 2016-03-16 15:20:41 +01:00
parent 06cf863fec
commit 7e438be4cf

View File

@ -61,7 +61,7 @@ class Rack::Attack
# Ban after: 10 POST requests within 30 seconds
blacklist('spamming with POST requests') do |request|
Rack::Attack::Allow2Ban.filter(request.identifier, maxretry: 10, findtime: 30.seconds, bantime: bantime(1.hour)) do
request.post? and not POST_WHITELISTED.include? '/auth/github'
request.post? and not POST_WHITELISTED.include? request.path
end
end