Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default hostname changes (azurewebsites.net) #10090

Closed
mathewc opened this issue May 1, 2024 · 2 comments
Closed

Default hostname changes (azurewebsites.net) #10090

mathewc opened this issue May 1, 2024 · 2 comments
Assignees

Comments

@mathewc
Copy link
Member

mathewc commented May 1, 2024

The App Service platform is moving to a strategy where the default hostname for a site will vary regionally. This means that code can't simply assume "azurewebsites.net".

New default hostname format: siteName-<dnlHash>.<region>.azurewebsites.net
SCM site will have this format:​ siteName-<dnlHash>.scm.<region>.azurewebsites.net

There are several known places in the host currently where we're using this string literal. We'll need to review all these and make changes as required. These include:

  • In defaulting the hostname used by the Host ID provider for Linux Dedicated (code here)
  • In constructing the Host ID for Linux Consumption (code here)
  • In the JWT issuer/audience values (code here). These aren't a problem and would be difficult to change anyways, since the App Service platform and Kudu are using these same values and rely on this contract.
  • FunctionsSyncManager uses the hostname to make Front End settriggers calls (code here). We need to make sure that the hostname value returned by the HostNameProvider is correct in all cases for these calls to work. For Linux Dedicated, I see there's already a problem - for that platform WEBSITE_HOSTNAME isn't set (at least it wasn't when the code was written), so it hardcodes "azurewebsites.net". This will need to change.
@fabiocav
Copy link
Member

fabiocav commented Jul 3, 2024

Work for this is in progress. Finalizing validation.

@soninaren
Copy link
Member

soninaren commented Aug 9, 2024

Please find notes from my investigation below.

  • In defaulting the hostname used by the Host ID provider for Linux Dedicated (code here)

HostName provider has hardcoded value for linux dedicated however the code path that hardcodes the value does not activate. This is because WEBSITE_HOSTNAME is available on Linux Dedicated. We simply need to remove the coding as it is dead code anyway. Remove the hardcoded string used to create hostname for Linux dedicated Remove the hardcoded string used to create hostname for Linux dedicated.

The host id generated here for region specific host name works fine. Any change here would be breaking for existing customers in sovereign and air gapped clouds. We can try to make the change here so that it only applies to public cloud.

  • FunctionsSyncManager uses the hostname to make Front End settriggers calls (code here). We need to make sure that the hostname value returned by the HostNameProvider is correct in all cases for these calls to work. For Linux Dedicated, I see there's already a problem - for that platform WEBSITE_HOSTNAME isn't set (at least it wasn't when the code was written), so it hardcodes "azurewebsites.net". This will need to change.

Have validated the hostname for all SKU's. As mentioned above WEBSITE_HOSTNAME is available in Linux dedicated the path that hardcodes the value is not activated.

Additionally have filed the item below Evalute if WEBSITE_DEFAULT_HOSTNAME should be used for setting hostname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants