Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Proxy Pass Original Host Header to Backend #1500
I'm experimenting with using Functions Proxies in front of some legacy applications. Those applications often use the Host header to build URLs and do redirects. Is there a way to pass the original Host header to the backend when proxying the request?
I've tried using the
The backend receives the X-ORIGINAL-HOST header correctly, but the host header is not correct.
Here's an example proxy I've set up:
This proxies to the backend Web App http://chandler-function-proxy-app1.azurewebsites.net/app1. This is just a simple Node.js script that prints out all the headers and the URL. Notice that the X-ORIGINAL-HOST header is set correct, but the host header is:
Full proxies.json for posterity