I seemingly have deployed my Django app with no issues. When I visit the site’s url, I get this error:
Invalid HTTP_HOST header: ‘legacy-htmx.fly.dev’. You may need to add ‘legacy-htmx.fly.dev’ to ALLOWED_HOSTS.
My settings.py file seems to be property configured:
ALLOWED_HOSTS = ["legacy-htmx.fly.dev", "localhost", "127.0.0.1"]
CSRF_TRUSTED_ORIGINS = "https://legacy-htmx.fly.dev"
However, when I check the traceback (in debugging mode), the settings section shows:
ALLOWED_HOSTS [‘localhost’, ‘0.0.0.0’, ‘127.0.0.1’]. Is there some reason ALLOWED_HOSTS isn’t deployed with the settings in my settings.py file? It is worth noting that if I set
ALLOWED_HOSTS = ["*"]
, I get an identical error and same settings parameters.
Any idea what could be going on?