Class: Sidekiq::Web::CsrfProtection
- Inherits:
-
Object
- Object
- Sidekiq::Web::CsrfProtection
- Defined in:
- lib/sidekiq/web/csrf_protection.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = nil) ⇒ CsrfProtection
constructor
A new instance of CsrfProtection.
Constructor Details
#initialize(app, options = nil) ⇒ CsrfProtection
Returns a new instance of CsrfProtection.
35 36 37 |
# File 'lib/sidekiq/web/csrf_protection.rb', line 35 def initialize(app, = nil) @app = app end |
Instance Method Details
#call(env) ⇒ Object
39 40 41 |
# File 'lib/sidekiq/web/csrf_protection.rb', line 39 def call(env) accept?(env) ? admit(env) : deny(env) end |