"".split(",") == [""]

This commit is contained in:
Midgard 2020-07-25 13:55:12 +02:00
parent a764d21e73
commit 01eb5c86bb
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -24,7 +24,8 @@ SECRET_KEY = os.getenv('SECRET_KEY', '2r@t7^g4-@980!oo-v!1+wj+0o^s&m(+yyyt#2&k2e
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv('DEBUG', '1') == '1'
ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', '').split(',')
_allowed_hosts = os.getenv('ALLOWED_HOSTS')
ALLOWED_HOSTS = _allowed_hosts.split(',') if _allowed_hosts else []
# Application definition