module Roda::RodaPlugins::Middleware
def self.configure(app, opts={}, &block)
after either the middleware or next app handles the request
and rack response for all requests passing through the middleware,
:handle_result :: Callable object that will be called with request environment
roda middleware in the same application.
You should only need to override this if you are using multiple
application that the current request is a middleware request.
:env_var :: Set the environment variable to use to indicate to the roda
Configure the middleware plugin. Options:
def self.configure(app, opts={}, &block) app.opts[:middleware_env_var] = opts[:env_var] if opts.has_key?(:env_var) app.opts[:middleware_env_var] ||= 'roda.forward_next' app.opts[:middleware_configure] = block if block app.opts[:middleware_handle_result] = opts[:handle_result] end