aboutsummaryrefslogtreecommitdiff
path: root/src/util/forwarded_headers.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-06-13 17:02:42 +0200
committerAlex Auvolat <alex@adnab.me>2023-06-13 17:14:11 +0200
commit90b2d43eb49d49c3aef4f501a30cf2f181adb183 (patch)
treef7f7c15547e2f2072a1841fcb2350c272faf3c9d /src/util/forwarded_headers.rs
parentbf19a44fd93584d5250a2e98e5b1d3a2de6d59d1 (diff)
parent01346143ca09eab262f0d8f8a0a744c2f6d667cc (diff)
downloadgarage-90b2d43eb49d49c3aef4f501a30cf2f181adb183.tar.gz
garage-90b2d43eb49d49c3aef4f501a30cf2f181adb183.zip
Merge branch 'main' into next
Diffstat (limited to 'src/util/forwarded_headers.rs')
-rw-r--r--src/util/forwarded_headers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/forwarded_headers.rs b/src/util/forwarded_headers.rs
index 6ae275aa..12f76434 100644
--- a/src/util/forwarded_headers.rs
+++ b/src/util/forwarded_headers.rs
@@ -13,7 +13,7 @@ pub fn handle_forwarded_for_headers(headers: &HeaderMap<HeaderValue>) -> Result<
.to_str()
.ok_or_message("Error parsing X-Forwarded-For header")?;
- let client_ip = IpAddr::from_str(&forwarded_for_ip_str)
+ let client_ip = IpAddr::from_str(forwarded_for_ip_str)
.ok_or_message("Valid IP address not found in X-Forwarded-For header")?;
Ok(client_ip.to_string())