log client/remote IP address on various routes tracing calls
this uses InsecureClientIp as this is purely for informational and logging purposes Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
74b29ce067
commit
f1d90e5df6
8 changed files with 59 additions and 31 deletions
|
@ -37,7 +37,6 @@ pub(crate) fn build(server: &Arc<Server>) -> io::Result<Router> {
|
|||
|
||||
let layers = layers
|
||||
.sensitive_headers([header::AUTHORIZATION])
|
||||
.sensitive_request_headers([HeaderName::from_static("x-forwarded-for")].into())
|
||||
.layer(axum::middleware::from_fn_with_state(Arc::clone(server), request::spawn))
|
||||
.layer(
|
||||
TraceLayer::new_for_http()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue