From 9edd16ce117e9b15ff95cfc8b23afcd565024713 Mon Sep 17 00:00:00 2001 From: David Evans Date: Fri, 19 Jan 2024 09:33:56 +0000 Subject: [PATCH] Configure ALLOWED_HOSTS Possibly we'll just want to hardcode this to `*` on the basis that we're capable of enforcing the right thing elsewhere in the chain, but I'm being conservative for now. --- airlock/settings.py | 2 +- dotenv-sample | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airlock/settings.py b/airlock/settings.py index 8604e713..eef1f7ee 100644 --- a/airlock/settings.py +++ b/airlock/settings.py @@ -54,7 +54,7 @@ def get_env_var(name): # SECURITY WARNING: don't run with debug turned on in production! DEBUG = get_env_var("DJANGO_DEBUG") == "True" -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = get_env_var("DJANGO_ALLOWED_HOSTS").split(",") # Application definition diff --git a/dotenv-sample b/dotenv-sample index 802b1ce9..9bc08ebd 100644 --- a/dotenv-sample +++ b/dotenv-sample @@ -1,7 +1,7 @@ # Default environment variables for local development DJANGO_DEBUG=True - DJANGO_SECRET_KEY="INSECURE-if-you-use-this-in-prod-you-will-have-a-bad-day" +DJANGO_ALLOWED_HOSTS="*" AIRLOCK_WORK_DIR=workdir/