better TA_HOST error handling

This commit is contained in:
simon 2023-02-18 09:56:50 +07:00
parent 571c2ce3a4
commit 4dfc9cef52
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -32,6 +32,8 @@ SECRET_KEY = PW_HASH.hexdigest()
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = bool(environ.get("DJANGO_DEBUG")) DEBUG = bool(environ.get("DJANGO_DEBUG"))
ALLOWED_HOSTS = []
if environ.get("TA_HOST"):
ALLOWED_HOSTS = [i.strip() for i in environ.get("TA_HOST").split()] ALLOWED_HOSTS = [i.strip() for i in environ.get("TA_HOST").split()]
CSRF_TRUSTED_ORIGINS = [] CSRF_TRUSTED_ORIGINS = []