From 6c280c3d6760621f8b50e56cf477f9286d35ffce Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 25 Mar 2024 03:15:47 +0300 Subject: Mask sensitive headers --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 6389489..b7a6035 100644 --- a/src/main.rs +++ b/src/main.rs @@ -229,7 +229,13 @@ async fn compose_kittybox( .route("/.kittybox/coffee", teapot_route()) .nest("/.kittybox/micropub/client", kittybox::companion::router()) .layer(tower_http::trace::TraceLayer::new_for_http()) - .layer(tower_http::catch_panic::CatchPanicLayer::new()); + .layer(tower_http::catch_panic::CatchPanicLayer::new()) + .layer(tower_http::sensitive_headers::SetSensitiveHeadersLayer::new([ + axum::http::header::AUTHORIZATION, + // Not used yet, but will be eventually + axum::http::header::COOKIE, + axum::http::header::SET_COOKIE, + ])); (router, task) } -- cgit 1.4.1