[GitHub] [apisix] tzssangglass commented on issue #5596: request help: customize Nginx variable in the configuration

2021-12-07 Thread GitBox


tzssangglass commented on issue #5596:
URL: https://github.com/apache/apisix/issues/5596#issuecomment-988537630


   Although this can be done. I'd like @spacewander 's way, do it with a 
special directive in `config-default.yaml`.


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




[GitHub] [apisix] tzssangglass commented on issue #5596: request help: customize Nginx variable in the configuration

2021-12-07 Thread GitBox


tzssangglass commented on issue #5596:
URL: https://github.com/apache/apisix/issues/5596#issuecomment-987926989


   > so maybe we are missing an http_server_location_configuration_snippet item.
   
   Yes, that's what I mean about our lack of provision for users to set custom 
variables. Would you like to try it?


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




[GitHub] [apisix] tzssangglass commented on issue #5596: request help: customize Nginx variable in the configuration

2021-11-28 Thread GitBox


tzssangglass commented on issue #5596:
URL: https://github.com/apache/apisix/issues/5596#issuecomment-981220726


   > 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
   > ```
   
   I think this part is more suitable for users to develop their own plugins to 
do so.
   
   


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