diff --git a/services/identity/src/websockets/mod.rs b/services/identity/src/websockets/mod.rs --- a/services/identity/src/websockets/mod.rs +++ b/services/identity/src/websockets/mod.rs @@ -67,11 +67,12 @@ let addr = self.addr; let future = async move { - tracing::debug!( + debug!( "Incoming HTTP request on WebSocket port: {} {}", req.method(), req.uri().path() ); + if hyper_tungstenite::is_upgrade_request(&req) { let (response, websocket) = hyper_tungstenite::upgrade(&mut req, None)?; @@ -82,12 +83,6 @@ return Ok(response); } - debug!( - "Incoming HTTP request on WebSocket port: {} {}", - req.method(), - req.uri().path() - ); - let response = match req.uri().path() { "/health" => Response::new(Body::from("OK")), _ => Response::builder()