From d1f127f2258323ab1979a0deba9156fb56e5beb4 Mon Sep 17 00:00:00 2001 From: Daniel Dao Date: Fri, 30 Sep 2016 10:41:55 +0000 Subject: [PATCH] allow comma-separated ALLOWED_HOSTS env when we have a comma-separated ALLOWED_HOSTS environment variable, split them, strip the whitespaces and put them into an array --- netbox/netbox/configuration.docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/configuration.docker.py b/netbox/netbox/configuration.docker.py index 81993ee21..a21714702 100644 --- a/netbox/netbox/configuration.docker.py +++ b/netbox/netbox/configuration.docker.py @@ -9,7 +9,7 @@ import os # access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name. # # Example: ALLOWED_HOSTS = ['netbox.example.com', 'netbox.internal.local'] -ALLOWED_HOSTS = [os.environ.get('ALLOWED_HOSTS', '')] +ALLOWED_HOSTS = [host.strip() for host in os.environ.get('ALLOWED_HOSTS', '').split(',')] # PostgreSQL database configuration. DATABASE = {