refactor: minor refactoring (#635)

This commit is contained in:
Santiago Bartesaghi 2023-10-27 21:46:07 -03:00 committed by GitHub
parent 4a68debb7a
commit ffc210250f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)