feat(middleware): return request ID in response header (#214)

This commit is contained in:
Sanchith Hegde
2022-12-22 12:19:26 +05:30
committed by GitHub
parent 6fb19c7f4a
commit 349036bff3
2 changed files with 63 additions and 0 deletions

View File

@ -35,6 +35,7 @@ pub(crate) mod macros;
pub mod routes;
pub mod scheduler;
mod middleware;
pub mod services;
pub mod types;
pub mod utils;
@ -95,6 +96,7 @@ pub fn mk_app(
let mut server_app = actix_web::App::new()
.app_data(json_cfg)
.wrap(middleware::RequestId)
.wrap(router_env::tracing_actix_web::TracingLogger::default())
.wrap(ErrorHandlers::new().handler(
StatusCode::NOT_FOUND,