Sha256: 3292df48445c04348de49e53089853d4c9253d560ddad5acdf56c23fc8d02245

Contents?: true

Size: 336 Bytes

Versions: 2

Compression:

Stored size: 336 Bytes

Contents

module RackAttackAdmin
  class KeysController < RackAttackAdmin::ApplicationController
    def destroy
      orig_key = params[:id]
      unprefixed_key = Rack::Attack.unprefix_key(orig_key)
      Rack::Attack.cache.delete unprefixed_key
      flash[:success] = "Deleted #{unprefixed_key}"
      redirect_to root_path
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack_attack_admin-0.1.2 app/controllers/rack_attack_admin/keys_controller.rb
rack_attack_admin-0.1.1 app/controllers/rack_attack_admin/keys_controller.rb