mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Add example instrumentation
This commit is contained in:
parent
61a046a203
commit
2092515c13
1 changed files with 9 additions and 0 deletions
9
examples/instrumentation.rb
Normal file
9
examples/instrumentation.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
# Log blacklists & throttles
|
||||
ActiveSupport::Notifications.subscribe('rack.attack.blacklist') do |name, start, finish, request_id, req|
|
||||
puts req.inspect
|
||||
end
|
||||
|
||||
ActiveSupport::Notifications.subscribe('rack.attack.throttle') do |name, start, finish, request_id, req|
|
||||
puts req.inspect
|
||||
end
|
||||
Loading…
Reference in a new issue