Class: RackAttackAdmin::RackAttackController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- RackAttackAdmin::RackAttackController
- Defined in:
- app/controllers/rack_attack_admin/rack_attack_controller.rb
Instance Method Summary collapse
- #current_request ⇒ Object
-
#index ⇒ Object
Web version of lib/tasks/rack_attack_admin_tasks.rake.
Methods inherited from ApplicationController
Instance Method Details
#current_request ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/rack_attack_admin/rack_attack_controller.rb', line 13 def current_request respond_to do |format| format.json do render json: current_request_rack_attack_stats end format.html end end |
#index ⇒ Object
Web version of lib/tasks/rack_attack_admin_tasks.rake
6 7 8 9 10 11 |
# File 'app/controllers/rack_attack_admin/rack_attack_controller.rb', line 6 def index @default_banned_ip = Rack::Attack::BannedIp.new(bantime: '60 m') @counters_h = Rack::Attack.counters_h. without(*Rack::Attack::BannedIps.keys) render end |