Expand description
Http Layer
s provided by Rama.
A Layer
, as defined in rama_core::Service
,
is a middleware that can modify the request and/or response of a Service
s.
It is also capable of branching between two or more Service
s.
Examples:
auth
: A layer that can be used to authenticate requests, branching in case the request is not authenticated (read: rejected).cors
: A layer that can be used to add CORS headers to the response.
Most layers are implemented as a Service
, and then wrapped in a Layer
.
This is done to allow the layer to be used as a service, and to allow it to be
composed with other layers.
Modules§
- Authorization related middleware.
- Apply a limit to the request body.
- Convert panics into responses.
- Tools for classifying responses as either success or failure.
- Collect the http
Body
- compression
compression
Middleware that compresses response bodies. - Middleware which adds headers for CORS.
- decompression
compression
Middleware that decompresses request and response bodies. - Layers in function of DNS.
- Middleware for following redirections.
- Middleware to support the reading and writing of Forwarded headers.
- Extract a header config from a request or response and insert it into the
Extensions
of itsContext
. - Similar to
super::header_config::HeaderConfigLayer
, but storing theDefault
value of typeT
in case the header with the givenHeaderName
is present and has a bool-like value. - Apply a transformation to the request body.
- Apply a transformation to the response body.
- Middleware that normalizes paths.
- opentelemetry
telemetry
Http OpenTelemetryLayer
Support for Rama. - Propagate a header from the request to the response.
- Middleware that validates if a request has the appropriate Proxy Authorisation.
- Middleware for removing headers from requests and responses.
- Set and propagate request ids.
- Middleware for setting required headers on requests and responses, if they are missing.
- Middleware for retrying “failed” requests.
- Middlewares that mark headers as sensitive.
- Middleware for setting headers on requests and responses.
- Middleware to override status codes.
- Middleware that applies a timeout to requests.
- Middleware to write Http traffic in std format.
- User-Agent (see also
rama-ua
) http layer support - Middleware that validates requests.