You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/29 01:13:30 UTC
[GitHub] [apisix] spacewander commented on issue #5596: request help: customize Nginx variable in the configuration
spacewander commented on issue #5596:
URL: https://github.com/apache/apisix/issues/5596#issuecomment-981208090
BTW, look like this part has to be maintained in the fork...
```
diff --git a/apisix/init.lua b/apisix/init.lua
index 801809f6..816352bf 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -505,6 +505,9 @@ function _M.http_access_phase()
or route_val.upstream
end
+ -- need to care of matched_upstream
+ ngx.var.upstream_name = api_ctx.matched_upstream.parent.value.name
+
if enable_websocket then
api_ctx.var.upstream_upgrade = api_ctx.var.http_upgrade
api_ctx.var.upstream_connection = api_ctx.var.http_connection
```
--
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-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org