From bbc4d78cbecc006f9a24c5226ebebfe66eb73eee Mon Sep 17 00:00:00 2001 From: Mohammed Alotaibi Date: Sat, 13 Jan 2024 17:29:23 +0300 Subject: [PATCH] Pass the request local and remote addr to the `Service::hyper_handler` function (#636) --- crates/core/src/service.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/core/src/service.rs b/crates/core/src/service.rs index ac021032a..fc4cb6dd5 100644 --- a/crates/core/src/service.rs +++ b/crates/core/src/service.rs @@ -144,9 +144,14 @@ impl Service { #[inline] pub async fn handle(&self, request: impl Into + Send) -> Response { let request = request.into(); - self.hyper_handler(SocketAddr::Unknown, SocketAddr::Unknown, request.scheme.clone(), None) - .handle(request) - .await + self.hyper_handler( + request.local_addr.clone(), + request.remote_addr.clone(), + request.scheme.clone(), + None, + ) + .handle(request) + .await } }