Azure-Samples / app-service-web-python-get-started

This Python (Django) sample app is used by the getting started content to demonstrate how easy it is to develop a web app and deploy it to Azure App Service.
MIT License
34 stars 210 forks source link

"DisallowedHost at /" error after deployment #5

Closed nickwalkmsft closed 7 years ago

nickwalkmsft commented 7 years ago

After deployment, browsing the site gives a yellow error screen with:

DisallowedHost at / Invalid HTTP_HOST header: ''. You may need to add u'' to ALLOWED_HOSTS.

Modifying ALLOWED_HOSTS in django_get_started/settings.py to { '*' } or { '' } fixes the issue.

Also mentioned in the comments at https://docs.microsoft.com/en-us/azure/app-service-web/app-service-web-get-started-python.

cephalin commented 7 years ago

Thanks @nickwalkmsft for showing the fix. Fixed by commit c407f63