Module middleware

Module middleware 

Source
Expand description

Experimental middleware.

Analogous to the middleware module in Actix Web.

Structs§

CatchPanic
A middleware to catch panics in wrapped handlers and middleware, returning empty 500 responses.
ConditionOption
Middleware for conditionally enabling other middleware in an Option.
ErrorHandlers
Middleware for registering custom status code based error handlers.
LoadShed
A middleware that sheds load when the inner service isn’t ready.
MapResBodyMiddleware
Middleware transform for map_response_body.
MapResMiddleware
Middleware transform for map_response.
NormalizePath
Middleware for normalizing a request’s path so that routes can be matched more flexibly.
PanicReporter
A middleware that triggers a callback when the worker is panicking.
RedirectHttps
Middleware to redirect traffic to HTTPS if connection is insecure.

Functions§

map_response
Creates a middleware from an async function that is used as a mapping function for a ServiceResponse.
map_response_body
Creates a middleware from an async function that is used as a mapping function for an impl MessageBody.
redirect_to_non_www
A function middleware to redirect traffic away from www. if it’s present.
redirect_to_www
A function middleware to redirect traffic to www. if not already there.