Class: SolidQueueUi::Web::CsrfProtection

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_queue_ui/web/csrf_protection.rb

Instance Method Summary collapse

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, options = 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