From 2908f8e9dc3e939b503d121221cdb9f08cc3a52f Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Tue, 23 Jul 2024 13:27:17 +0200 Subject: [PATCH] use the standard x-forwarded-for instead of x-real-ip to get client ip from reverse proxy --- src/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.rs b/src/http.rs index afef91c..021c9f9 100644 --- a/src/http.rs +++ b/src/http.rs @@ -65,7 +65,7 @@ impl Request { match key { "host" => host = Some(value.to_owned()), "range" => range = RequestRange::parse(value), - "x-real-ip" => real_ip = Some(value.to_owned()), + "x-forwarded-for" => real_ip = Some(value.to_owned()), "user-agent" => user_agent = value.to_owned(), _ => (), }