From 86748ea09fef454658fb83166db22447b3dcabb9 Mon Sep 17 00:00:00 2001 From: Sven Seeberg Date: Sun, 17 Mar 2024 16:43:05 +0100 Subject: [PATCH] Split allowed host with comma --- opendrift_leeway_webgui/core/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendrift_leeway_webgui/core/settings.py b/opendrift_leeway_webgui/core/settings.py index 7aeb889..79e6e96 100644 --- a/opendrift_leeway_webgui/core/settings.py +++ b/opendrift_leeway_webgui/core/settings.py @@ -49,7 +49,7 @@ #: This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe #: web server configurations (see :setting:`django:ALLOWED_HOSTS` and :ref:`django:host-headers-virtual-hosting`) ALLOWED_HOSTS = [".localhost", "127.0.0.1", "[::1]"] + [ - x.strip() for x in os.environ.get("LEEWAY_ALLOWED_HOSTS", "").splitlines() if x + x.strip() for x in os.environ.get("LEEWAY_ALLOWED_HOSTS", "").split(",") if x ] #: Enabled applications (see :setting:`django:INSTALLED_APPS`)