From 6046b7326ce6878fc5ded22a19d4d79cc81e7733 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sat, 14 Jun 2025 17:19:36 +0200 Subject: [PATCH] Update DEBUG setting and configure allowed hosts in settings.py --- musik/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/musik/settings.py b/musik/settings.py index 61c9c8f..0471604 100644 --- a/musik/settings.py +++ b/musik/settings.py @@ -24,10 +24,11 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "django-insecure-&z*xu$^w8btr(%1!y#+0a98)l_q*+*6z54611pi678mdpsar_=" # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = "DEBUG" in os.environ -ALLOWED_HOSTS = [] -CSRF_TRUSTED_ORIGINS = ["https://localhost"] +HOST = os.getenv("MUSIK_HOST", "localhost") +ALLOWED_HOSTS = [HOST] +CSRF_TRUSTED_ORIGINS = [f"https://{HOST}"] # Application definition