Skip to main content

request_id

Function request_id 

Source
pub async fn request_id(request: Request, next: Next) -> Response
Expand description

Middleware that adds a unique X-Request-Id header to every request/response. If the client sends one, it is preserved. Otherwise a new UUID is generated.