Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am currently trying to setup an umbraco site.
The umbraco installation is hosting multiple sites and the different nodes are selected by subdomain e.g: sub1.mysite.com, sub2.mysite.com.
Now the difficult part is that the security system around the umbraco installation will strip the header completely, leaving only an internally known host in the head, but the original host will be available in "x-forwarded-host".
Is there any way to make umbraco select different nodes based on "x-forwarded-host"?
Hi MB JF,
Did you ever get a solution working for this? We are experiencing the same issue at the moment.
Yes and no.
No being that I was not able to find any way to make Umbraco react to another header, other than “host”.
What I did was I added an ARR to the infrastructure do some header switching.
The are take the X-Forwarded-Host header and placed the value in the HOST header and sent the request to the IIS.
What's "ARR" in your setup?
Facing the same issue now. I'm considering HOST header replacement, but now discussing if we should do it on the Gateway level or within the app.
Any suggestions from the previous experience?
We ended up having a rewrite rule which replaces the HOST with the X-FORWARDED-HOST header within the web config.
Please note this means there needs to be an applicationHost.xdt file added to the Kudu console if you are using azure app services in order to expost the x-forwarded-host header.
You mean "X-ORIGINAL-HOST"? It's set for me by default, when X-FORWARDED-HOST seems to be empty without adding it manually at the gateway level. If so... that's exactly what I'm doing now.
Following the instructions from:
I've improved the process by installing/enabling the Kudu/AppService extensions via DevOps pipeline, so I don't need to do anything manually on any environment to make it work.
Seems like it's all working fine now, so I'm continuing testing and documenting the output. Cheers!
ARR is an IIS module (https://www.iis.net/downloads/microsoft/application-request-routing)
What we did was:
Request was received on a internal security system, at this point, the "host" header was placed in the "X-Forwarded-Host" header.
The request was then directed to the ARR where we made a rule to replace the, now changed, "Host" with whatever was in the "X-Forwarded-Host", if it was not empty.
The rules in the ARR is made the same way as URL Rewrite rules.
I am not sure this answers your question, but that is how I resolved this problem.
Thanks for sharing. As usual, there is more than one way of resolving the issue. Glad we both find the solutions! Cheers.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted