Skip to content

Commit 4db4245

Browse files
committed
config: set ALLOWED_HOSTS via an environment variable
1 parent 122e54c commit 4db4245

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gregoplus/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
# SECURITY WARNING: don't run with debug turned on in production!
2929
DEBUG = (os.environ.get('DEBUG') == 'true')
3030

31-
ALLOWED_HOSTS = []
31+
hosts = os.environ.get('ALLOWED_HOSTS')
32+
ALLOWED_HOSTS = hosts.split(' ') if hosts else []
3233

3334

3435
# Application definition

0 commit comments

Comments
 (0)