Class: RackAttackAdmin::RackAttackController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rack_attack_admin/rack_attack_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#toggle_flags

Instance Method Details

#current_requestObject



14
15
16
# File 'app/controllers/rack_attack_admin/rack_attack_controller.rb', line 14

def current_request
  render json: current_request_rack_attack_stats
end

#indexObject

Web version of lib/tasks/rack_attack_admin_tasks.rake



6
7
8
9
10
11
12
# File 'app/controllers/rack_attack_admin/rack_attack_controller.rb', line 6

def index
  @default_banned_ip = Rack::Attack::BannedIp.new(bantime: '60 m')
  @banned_ip_keys = Rack::Attack::Fail2Ban.banned_ip_keys
  @counters_h     = Rack::Attack.counters_h.
    without(*Rack::Attack::BannedIps.keys)
  render
end