I followed the tutorial here: https://docs.digitalocean.com/tutorials/app-deploy-django-app/. I am getting the DisallowedHost error when trying to visit my web app at https://pulseapp-4av7x.ondigitalocean.app/.
I’ve tried adding the name of the site to allowed hosts to no avail. Right now I’m using DJANGO_ALLOWED_HOSTS as an environment variable, with ${APP_DOMAIN} as the value as the tutorial tells me to do, but it’s not working.
Any help with this would be appreciated.
Kind regards,
David
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @,
Just to be sure, confirm you’ve configured the following part of the tutorial as well:
For your Django app to function, you need to set the following environment variables like so:
DJANGO_ALLOWED_HOSTS -> ${APP_DOMAIN}
DATABASE_URL -> ${<NAME_OF_YOUR_DATABASE>.DATABASE_URL}
DEBUG -> True