about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-03-25 03:15:47 +0300
committerVika <vika@fireburn.ru>2024-06-14 22:21:26 +0300
commit6c280c3d6760621f8b50e56cf477f9286d35ffce (patch)
treec620abcc8c4d836f519caa897c96e9ce4a5652d3 /src/main.rs
parent8fd75d6dc74db029ddfdb64dedcc2779f0f82455 (diff)
Mask sensitive headers
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 7 insertions, 1 deletions
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)
 }