fix log message

This commit is contained in:
Jun Kurihara 2022-07-06 07:44:04 +09:00
commit 22a4896693
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
2 changed files with 13 additions and 3 deletions

View file

@ -31,7 +31,17 @@ where
mut req: Request<Body>,
client_addr: SocketAddr, // アクセス制御用
) -> Result<Response<Body>> {
debug!("Handling request: {:?}", req);
info!(
"Handling {:?} request from {}: {} {} {:?}",
req.version(),
client_addr,
req.method(),
req.uri(),
req
.headers()
.get("user-agent")
.map_or_else(|| "<none>", |ua| ua.to_str().unwrap())
);
// Here we start to handle with server_name
// Find backend application for given server_name
let (server_name, _port) = if let Ok(v) = parse_host_port(&req, self.tls_enabled) {