yangxikun opened a new issue #2536: URL: https://github.com/apache/apisix/issues/2536
### Issue description We deploy apisix in istio mesh, and configure apisix route request to upstream(an k8s service). The client request example: ``` GET /a/b/c HTTP/1.1 Host: foo.com ``` The upstream: http://foo.default.svc:8080. The `Host: foo.com` will be proxy to foo service backend, but the istio sidecar cann't route these request. So we modified apisix/init.lua: ``` function _M.http_access_phase() ...... set_upstream_host(api_ctx) ngx.var.upstream_host = api_ctx.upstream_conf.nodes[1].domain end ``` Change $upstream_host to configured upstream domain, so that the proxy request host will be foo.default.svc, then istio sidecar can route correctly. Is there a more elegant way to solve this problem? ### Environment * apisix version (cmd: `apisix version`): 1.5 * OS: ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
