diff --git a/lib/rack/attack/throttle.rb b/lib/rack/attack/throttle.rb index 69923393..0ec5f7aa 100644 --- a/lib/rack/attack/throttle.rb +++ b/lib/rack/attack/throttle.rb @@ -38,8 +38,9 @@ def matched_by?(request) 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)