Skip to main content

Module required_header

Module required_header 

Available on crate features http and std only.
Expand description

Middleware that fills in headers a request or response is expected to carry.

By default only missing headers are added; existing ones are left untouched unless overwriting is enabled.

Modules§

request
Add the Host and User-Agent headers to a request, if they are missing.
response
Add the Server and Date headers to a response, if they are missing.

Structs§

AddRequiredRequestHeaders
Middleware that adds the Host and User-Agent headers to a request before passing it to the inner service.
AddRequiredRequestHeadersLayer
Layer that wraps a service in AddRequiredRequestHeaders.
AddRequiredResponseHeaders
Middleware that adds the Server and Date headers to the response returned by the inner service.
AddRequiredResponseHeadersLayer
Layer that wraps a service in AddRequiredResponseHeaders.