Class: Wurk::Web::MiddlewareStack

Inherits:
Object
  • Object
show all
Defined in:
lib/wurk/web/config.rb

Overview

Engine Rack middleware that applies the host-registered ‘Wurk::Web.use` chain (Devise/Warden/Sorcery/Rack::Auth::Basic) in front of the dashboard. Inserted ahead of `Authorization` so host auth runs first and its `env` (e.g. `env`) is visible to the authorization hook. The chain is built lazily on first request — after host initializers have run — then memoized on the Config.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ MiddlewareStack

Returns a new instance of MiddlewareStack.



171
172
173
# File 'lib/wurk/web/config.rb', line 171

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



175
176
177
# File 'lib/wurk/web/config.rb', line 175

def call(env)
  Wurk::Web.config.rack_app(@app).call(env)
end