[−][src]Crate actix_web_middleware_requestid
actix-web-middleware-requestid
Request ID middleware for the actix-web framework v2.0+. Adds a custom header with a unique token to every request.
Usage
Add the package to Cargo.toml:
[dependencies]
actix-web-middleware-requestid = "2.0"
Import and add middleware to your server definition:
use actix_web_middleware_requestid::RequestID; ... App::new() ... .wrap(RequestID)
For actix-web v1.x use version "1.0" of the same package. The usage pattern and all exported names remain the same.
For actix-web < 1.0
Consider using a similar crate actix-web-requestid
Structs
RequestID | Request ID extractor |
RequestIDMiddleware | Actual actix-web middleware |
RequestIDWrapper | Request ID wrapper. |
Constants
REQUEST_ID_HEADER | The header set by the middleware |