Revolyssup commented on issue #12121: URL: https://github.com/apache/apisix/issues/12121#issuecomment-2788840199
ctx.var: A cached copy of Nginx variables created during early phases (e.g., rewrite/access phase). It does NOT update automatically after the upstream response. For example, $status is 0 in ctx.var because it was initialized before the upstream request was sent. ngx.var: Directly accesses live Nginx variables in real-time. In the header_filter phase, ngx.var.status reflects the actual HTTP status from the upstream response (e.g., 200). If you're using in header_filter phase, you should use ngx.var -- 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]
