Class: SolidQueueUi::Web::CsrfProtection
- Inherits:
-
Object
- Object
- SolidQueueUi::Web::CsrfProtection
- Defined in:
- lib/solid_queue_ui/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.
36 37 38 |
# File 'lib/solid_queue_ui/web/csrf_protection.rb', line 36 def initialize(app, = nil) @app = app end |
Instance Method Details
#call(env) ⇒ Object
40 41 42 |
# File 'lib/solid_queue_ui/web/csrf_protection.rb', line 40 def call(env) accept?(env) ? admit(env) : deny(env) end |