I am trying to write a new plugin that dynamically generates upstream url (based on header value).
So far I successfully changed upstream host using:
ngx.ctx.balancer_address
but I need to change path for upstream url too, do you know how can I achieve this ?
I found somewhere that ngx.var.upstream_url but it gives me an error:
“variable “upstream_url” not found for writing;”
Thanks for your response, however I had to park this plugin as we do not need it currently. Might come back to it in near future and will try out your solution.