diff options
author | Vika <vika@fireburn.ru> | 2024-03-25 03:15:47 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-06-14 22:21:26 +0300 |
commit | 6c280c3d6760621f8b50e56cf477f9286d35ffce (patch) | |
tree | c620abcc8c4d836f519caa897c96e9ce4a5652d3 /src | |
parent | 8fd75d6dc74db029ddfdb64dedcc2779f0f82455 (diff) | |
download | kittybox-6c280c3d6760621f8b50e56cf477f9286d35ffce.tar.zst |
Mask sensitive headers
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 8 |
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) } |