Merge pull request #235 from travis-ci/cd-fix-spam-reqs
Remove hard coded request path to allow whitelisted request paths
This commit is contained in:
commit
55621067cc
|
@ -61,7 +61,7 @@ class Rack::Attack
|
||||||
# Ban after: 10 POST requests within 30 seconds
|
# Ban after: 10 POST requests within 30 seconds
|
||||||
blacklist('spamming with POST requests') do |request|
|
blacklist('spamming with POST requests') do |request|
|
||||||
Rack::Attack::Allow2Ban.filter(request.identifier, maxretry: 10, findtime: 30.seconds, bantime: bantime(1.hour)) do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user