Skip to content

Commit

Permalink
feat(http): add client ip
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarisW committed Nov 18, 2024
1 parent b24d32d commit 590db06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions volo-http/src/server/utils/client_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ impl<S> ClientIPService<S> {
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),
};
Expand Down

0 comments on commit 590db06

Please sign in to comment.