From 590db06a5c02d1556c34350a7100a3c107c74689 Mon Sep 17 00:00:00 2001 From: StellarisW Date: Mon, 18 Nov 2024 20:20:58 +0800 Subject: [PATCH] feat(http): add client ip --- volo-http/src/server/utils/client_ip.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/volo-http/src/server/utils/client_ip.rs b/volo-http/src/server/utils/client_ip.rs index 2d38717a..aa2809e1 100644 --- a/volo-http/src/server/utils/client_ip.rs +++ b/volo-http/src/server/utils/client_ip.rs @@ -207,6 +207,7 @@ impl ClientIPService { fn get_client_ip(&self, cx: &ServerContext, headers: &HeaderMap) -> ClientIP { let remote_ip = match &cx.rpc_info().caller().address { Some(Address::Ip(socket_addr)) => Some(socket_addr.ip()), + #[cfg(target_family = "unix")] Some(Address::Unix(_)) => None, None => return ClientIP(None), };