Remove default routing behaviour when there are hostnames configured #14330
skartknet
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The default Umbraco bahaviour to route requests, is by returning the content of the first root it finds in the content tree. This saves us of having to specify domains in the root and makes things easy.
But I find it a problem when there are multi sites configured in one Umbraco install.
To put into context, we recently came across this problem when setting up FrontDoor for an Azure webapp. We had 2 roots and both were configured to respond to different domains.
These domains were set up in FrontDoor correctly and the site was responding for both domains. BUT, we realised that the root of the second site was displaying the root of the first site instead. To make things even weirder, the subpages of the second site were actually working fine.
The issue was that Frontdoor was sending the default Azure domain of the webapp in the 'Backend host header` parameter. This domain is added by default to the Azure webapp, Umbraco picks it up and returns the first page that matches the url regardless if it's in the first or the second root. It doesn't care that both roots are configured for 2 other specific domains and are not the Azure one.
The fix was adding both custom domains to the webapp and leaving the 'Backend host header` blank so the requested domain is passed directly to the webapp instead of using the Azure domain.
If Umbraco ignored any domains not specifically configured we could have figured earlier that the domains were;t set up properly.
I reckon that behaviour is a feature that becomes a problem for scenarios like this. I think Umbraco should disable the default routing behaviour IF there are any hostnames configured.
Beta Was this translation helpful? Give feedback.
All reactions