public protocol Middleware
Middleware is placed between the server and your router. It is capable of
mutating both incoming requests and outgoing responses.
Middleware can choose
to pass requests on to the next
Middleware in a chain, or they can short circuit and
return a custom
Response if desired.
Types Conforming to
Helper for creating authentication middleware.
Middleware that adds support for CORS settings in request responses. For configuration of this middleware please use the
Captures all errors and transforms them into an internal server error HTTP response.
Serves static files from a public directory.
Uses HTTP cookies to save and restore sessions for connecting clients.
Called with each
Request that passes through this middleware.