<p>TLDR: I'm running a kubernetes cluster using AKS. I have created an external name service to proxy to an external address. I would like to add a 'Host' header to the request. How should I go about doing this?</p>

<p>For more context I have an ingress controller that handles all incoming traffic. I want to route a subset of that traffic (based on route) to an external Azure Function. I have set up an ExternalName service with the hostname of my Azure Function and am routing the traffic to it. However, because of the way Microsoft handles routing to it's functions a 'Host' value with the correct FQDN is required in the header.</p>

<p>I don't want to make whoever sends the original request include this in the header so I'd like to add it on their behalf when traffic is proxy'd to the Azure Function.</p>

<p>Here is my service file:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: azure-function-proxy-service
  labels:
    app: proxy-service
spec:
  type: ExternalName
  externalName: azure-function.azurewebsites.net
</code></pre>

<p>And the relevant ingress rules code:</p>

<pre><code>- host: hostto.proxy.net
http:
  paths:
  - path: /route/to/proxy
    backend:
      serviceName: azure-function-proxy-service
      servicePort: 80
</code></pre>

<p>I found that what I really wanted to do was modify the header of a request as it passes through my ingress controller. The best option I found to do that was the <code>nginx.ingress.kubernetes.io/configuration-snippet</code> but it did not give me the fine grained control I wanted.</p>

<p>Ultimately I had to stand up an additional nginx instance to proxy the requests so that I could have total control over the nginx config.</p>
