spacewander commented on code in PR #8275:
URL: https://github.com/apache/apisix/pull/8275#discussion_r1063198605
##########
apisix/init.lua:
##########
@@ -267,6 +267,11 @@ local function set_upstream_headers(api_ctx, picked_server)
api_ctx.var.var_x_forwarded_host = x_forwarded_host
end
+ local x_forwarded_for = api_ctx.var.proxy_add_x_forwarded_for
+ if x_forwarded_for then
+ api_ctx.var.var_x_forwarded_for = x_forwarded_for
Review Comment:
Maybe we can set `proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for` directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]