2.1.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0A rust library to add a requestid with the actix-web framework.
Add this to your Cargo.toml:
[dependencies]
actix-web-requestid = "2.1.0"
And this to your crate root:
use actix_web::{web, App, HttpServer, HttpResponse, Error};
use actix_web_requestid::{RequestID, RequestIDMiddlware};
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(
|| App::new()
.wrap(RequestIDMiddleware::new())
.service(web::resource("/").to(|| HttpResponse::Ok())))
.bind("127.0.0.1:59880")?
.run()
.await
}
actix-web-requestid is distributed under the terms of both the MIT license and the Apache License (Version 2.0).