membphis commented on code in PR #12551:
URL: https://github.com/apache/apisix/pull/12551#discussion_r2312812305


##########
conf/config.yaml.example:
##########
@@ -141,6 +141,8 @@ apisix:
                                   # or (standalone mode) the config isn't 
loaded yet either via file or Admin API.
   # disable_upstream_healthcheck: false # A global switch for healthcheck. 
Defaults to false.
                                         # When set to true, it overrides all 
upstream healthcheck configurations and globally disabling healthchecks.
+# trusted_addresses:              # When enabled, APISIX will trust the 
`X-Forwarded-*` Headers

Review Comment:
   add more explain about the default process way



##########
apisix/init.lua:
##########
@@ -599,6 +587,53 @@ function _M.handle_upstream(api_ctx, route, 
enable_websocket)
 end
 
 
+local function handle_x_forwarded_headers(api_ctx)
+    local addr_is_trusted = 
trusted_addresses_util.is_trusted(api_ctx.var.realip_remote_addr)

Review Comment:
   it seems wrong, pls confirm should we use `var.remote_addr` here



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to