Allow setting ALLOWED_HOSTS directly

This commit is contained in:
Jake Howard 2022-11-16 14:57:33 +00:00
parent 6f6e57a0c7
commit d16c8d83f0
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -13,6 +13,7 @@ env = environ.Env(
SEO_INDEX=(bool, False), SEO_INDEX=(bool, False),
SENTRY_DSN=(str, ""), SENTRY_DSN=(str, ""),
TEST=(bool, False), TEST=(bool, False),
ALLOWED_HOSTS=(list, ["*"]),
) )
# Read local secrets # Read local secrets
@ -24,7 +25,7 @@ TEST = env("TEST")
SECRET_KEY = env("SECRET_KEY") SECRET_KEY = env("SECRET_KEY")
BASE_HOSTNAME = env("BASE_HOSTNAME") BASE_HOSTNAME = env("BASE_HOSTNAME")
ALLOWED_HOSTS = ["*"] if DEBUG else [BASE_HOSTNAME] ALLOWED_HOSTS = env("ALLOWED_HOSTS")
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"