mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Merge pull request #91 from gsamokovarov/call-responses
Invoke Rack:::{blacklisted,throttled}_response with #call
This commit is contained in:
commit
e7efe1cf5f
2 changed files with 4 additions and 4 deletions
|
|
@ -73,9 +73,9 @@ def call(env)
|
|||
if whitelisted?(req)
|
||||
@app.call(env)
|
||||
elsif blacklisted?(req)
|
||||
blacklisted_response[env]
|
||||
self.class.blacklisted_response.call(env)
|
||||
elsif throttled?(req)
|
||||
throttled_response[env]
|
||||
self.class.throttled_response.call(env)
|
||||
else
|
||||
tracked?(req)
|
||||
@app.call(env)
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ class Rack::Attack
|
|||
if whitelisted?(req)
|
||||
@app.call(env)
|
||||
elsif blacklisted?(req)
|
||||
self.class.blacklisted_response[env]
|
||||
self.class.blacklisted_response.call(env)
|
||||
elsif throttled?(req)
|
||||
self.class.throttled_response[env]
|
||||
self.class.throttled_response.call(env)
|
||||
else
|
||||
tracked?(req)
|
||||
@app.call(env)
|
||||
|
|
|
|||
Loading…
Reference in a new issue