From 9d6fdb3e9854d9eac9509cb471fda83c7ea5addb Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 6 Jul 2022 21:23:31 +0900 Subject: [PATCH] fix log message --- src/proxy/proxy_handler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proxy/proxy_handler.rs b/src/proxy/proxy_handler.rs index 03ad055..f4fc2c3 100644 --- a/src/proxy/proxy_handler.rs +++ b/src/proxy/proxy_handler.rs @@ -36,10 +36,10 @@ where req.version(), client_addr, req.method(), - req - .headers() - .get("host") - .map_or_else(|| "", |h| h.to_str().unwrap()), + req.headers().get("host").map_or_else( + || req.uri().host().unwrap_or(""), + |h| h.to_str().unwrap() + ), req.uri(), req .headers()