From: fozzie Date: Mon, 21 Jul 2025 04:39:44 +0000 (-0500) Subject: log tweaks X-Git-Url: https://git.humopery.space/?a=commitdiff_plain;h=8c8744ac544b96bd092ce09291150b22ff80a2e2;p=waterslager.git log tweaks --- diff --git a/src/handler.rs b/src/handler.rs index f753103..a72be4d 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -68,7 +68,10 @@ pub async fn check_canary_result( return error_response(StatusCode::BAD_REQUEST, "URI missing from form data".to_string()); }; - info!("IP {:?} ... Checking canary at {}", headers.get("X-Forwarded-For"), uri); + match headers.get("X-Forwarded-For") { + Some(remote_addr) => info!("IP {:?} ... Checking canary at {}", remote_addr, uri), + None => info!("IP unavailable ... Checking canary at {}", uri), + } match ureq::get(uri.clone()).call() { Ok(mut resp) => match resp.body_mut().read_to_string() { @@ -100,9 +103,9 @@ fn read_verifier(mut verifier: Verifier<'_,Helper>, url: String, state: State, helper: Helper, url: String, State(state): State) -> CheckResponse { match String::from_utf8(content) { Ok(content) => { - info!("Good signature from {:?} ({:?})", - helper.get_fingerprint(), - helper.get_description()); + info!("Good signature from {} ({})", + helper.get_fingerprint().unwrap(), + helper.get_description().unwrap()); (StatusCode::OK,Html(ShowCheckFormTemplate{ url: Some(url),