add TA_HOST env for ALLOWED_HOSTS

This commit is contained in:
simon 2022-07-14 17:26:10 +07:00
parent 91bccfd057
commit 3b17c01c6d
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ required="Missing required environment variable"
[[ -f $lockfile ]] || : "${TA_USERNAME:?$required}"
: "${TA_PASSWORD:?$required}"
: "${ELASTIC_PASSWORD:?$required}"
: "${TA_HOST:?$required}"
# ugly nginx and uwsgi port overwrite with env vars
if [[ -n "$TA_PORT" ]]; then

View File

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