module Roda::RodaPlugins::Middleware::InstanceMethods
Public Instance Methods
Source
# File lib/roda/plugins/middleware.rb, line 204 def _roda_run_main_route(r) res = super if r.forward_next r.env['roda.response_headers'] = response.headers if opts[:middleware_forward_response_headers] throw :next, true end res end
Override the route block so that if no route matches, we throw so that the next middleware is called.
Calls superclass method
Source
# File lib/roda/plugins/middleware.rb, line 191 def call(&block) super do |r| res = instance_exec(r, &block) # call Fallback if r.forward_next r.env['roda.response_headers'] = response.headers if opts[:middleware_forward_response_headers] throw :next, true end res end end
Override the route block so that if no route matches, we throw so that the next middleware is called. Old Dispatch API.
Calls superclass method