From 2603c0f4c0d8763e5c8b9021a356f42dbd7d24cb Mon Sep 17 00:00:00 2001 From: Alone88 Date: Mon, 24 Jun 2024 16:50:22 +0800 Subject: [PATCH] fix: update gateway default X-forwarded-For (#1950) Signed-off-by: Alone88 --- gateway/controller/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/controller/config/config.go b/gateway/controller/config/config.go index 2e5f57518..5656e6dcf 100644 --- a/gateway/controller/config/config.go +++ b/gateway/controller/config/config.go @@ -105,7 +105,7 @@ func NewDefault() Configuration { ProxySetHeaders: map[string]string{ "Host": "$best_http_host", "X-Real-IP": "$remote_addr", - "X-Forwarded-For": "$remote_addr", + "X-Forwarded-For": "$proxy_add_x_forwarded_for", "X-Forwarded-Host": "$best_http_host", "X-Forwarded-Port": "$pass_port", "X-Forwarded-Proto": "$pass_access_scheme",