Skip to content

Commit ffc2102

Browse files
authored
refactor: minor refactoring (#635)
1 parent 4a68deb commit ffc2102

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/rack/attack/throttle.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def matched_by?(request)
3838
epoch_time: cache.last_epoch_time
3939
}
4040

41+
annotate_request_with_throttle_data(request, data)
42+
4143
(count > current_limit).tap do |throttled|
42-
annotate_request_with_throttle_data(request, data)
4344
if throttled
4445
annotate_request_with_matched_data(request, data)
4546
Rack::Attack.instrument(request)

0 commit comments

Comments
 (0)