Description
What's the original intent on using $upstream in the proxy_backend.conf.template? If nginx has to replace proxy_pass argument with a variable, it will end up using the DNS resolver to resolve the hostname, and not /etc/hosts first, which defeats the purpose of extra_hosts. Because it's a template, can we replace the proxy_pass argument with the BACKEND environment variable instead? I had to manually mount an edited template to force nginx to resolve a hostname mapped through extra_hosts.