Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 442 forks source link

Evalute if WEBSITE_DEFAULT_HOSTNAME should be used for setting hostname #10385

Open soninaren opened 1 month ago

soninaren commented 1 month ago

WEBSITE_DEFAULT_HOSTNAME was introduced as part of the work to address regional domain name changes to app service. Here is a sample value of this new app setting. test-h4g6apbtgfcdhef3.eastus.azurewebsites.net

Currently we use the WAS_DEFAULT_HOSTNAME header injected by the front end as a backup for identifying the correct hostname. https://github.com/Azure/azure-functions-host/blob/6c23426d7de334e628212eba095002f7d8a78ffe/src/WebJobs.Script/HostNameProvider.cs#L53-L62

We should evaluate if we should switch to using WEBSITE_DEFAULT_HOSTNAME

mathewc commented 1 month ago

Are you saying that WEBSITE_DEFAULT_HOSTNAME gets updated as part of a site swap? Because that's why HostNameProvider using the FE header - to handle the changing hostname during a slot swap.