0
votes

I'm trying to use a reverse proxy with IIS to point to an Express appliction. I've got the URL Rewrite working pointing my dnsname.domain.com:80 to localhost:3001 but I have a need to have the request headers in express to see my dnsname.domain.com instead of localhost:3001 for req.headers.host

I've been messing with outbound rules and trying to set HTTP_HOST to the domain value but I haven't been able to get around this

IIS URL Rewrite

Is what I'm wanting to do possible? Our login system at works needs to see dnsname.domain.com to function properly so passing localhost:3001 is causing it to fail

1

1 Answers

0
votes

As far as I know, the Application Request Routing has an option to preserve the original host header: preserveHostHeader.

This option is by default false. You can enable it with below command:

"C:\Windows\System32\inetsrv\appcmd.exe" set config -section:system.webServer/proxy /preserveHostHeader:"True" /commit:apphost