mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
refactor: minor refactoring (#635)
This commit is contained in:
parent
4a68debb7a
commit
ffc210250f
1 changed files with 2 additions and 1 deletions
|
|
@ -38,8 +38,9 @@ module Rack
|
|||
epoch_time: cache.last_epoch_time
|
||||
}
|
||||
|
||||
annotate_request_with_throttle_data(request, data)
|
||||
|
||||
(count > current_limit).tap do |throttled|
|
||||
annotate_request_with_throttle_data(request, data)
|
||||
if throttled
|
||||
annotate_request_with_matched_data(request, data)
|
||||
Rack::Attack.instrument(request)
|
||||
|
|
|
|||
Loading…
Reference in a new issue