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",