diff --git a/server/src/utils/ip_extract.rs b/server/src/utils/ip_extract.rs index fa7d351..a04ed8e 100644 --- a/server/src/utils/ip_extract.rs +++ b/server/src/utils/ip_extract.rs @@ -210,7 +210,11 @@ fn xff_rightmost_untrusted(headers: &HeaderMap, trusted: &TrustedProxies) -> Opt // Walk right-to-left, skipping trusted proxies, and return the first client // address (the hop the outermost trusted proxy actually saw). - tokens.iter().rev().find(|ip| !trusted.is_trusted(ip)).copied() + tokens + .iter() + .rev() + .find(|ip| !trusted.is_trusted(ip)) + .copied() } #[cfg(test)]