From 445c92bce8b044dee449266171ad70a9b622d04f Mon Sep 17 00:00:00 2001 From: Jackson Warhover <11669560+jbwar22@users.noreply.github.com> Date: Mon, 4 May 2026 15:33:24 -0400 Subject: [PATCH 1/2] permit adjusting allowed hosts in localhost mode --- config/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/settings.py b/config/settings.py index b4f8a77..bbe6706 100644 --- a/config/settings.py +++ b/config/settings.py @@ -77,7 +77,8 @@ ALLOWED_HOSTS = env("ALLOWED_HOSTS") if LOCALHOST is True: - ALLOWED_HOSTS = ["127.0.0.1", "localhost"] + ALLOWED_HOSTS += ["127.0.0.1", "localhost"] + CSRF_TRUSTED_ORIGINS = [f"http://{host}" for host in ALLOWED_HOSTS] + [f"https://{host}" for host in ALLOWED_HOSTS] else: ALLOWED_HOSTS.append("localhost") From ac2081682520dc438ebc4addce6affa4d332de48 Mon Sep 17 00:00:00 2001 From: Jackson Warhover <11669560+jbwar22@users.noreply.github.com> Date: Mon, 4 May 2026 15:40:57 -0400 Subject: [PATCH 2/2] fix typo --- config/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings.py b/config/settings.py index bbe6706..927b6a1 100644 --- a/config/settings.py +++ b/config/settings.py @@ -48,7 +48,7 @@ DEBUG_TOOLBAR=(bool, False), # END_FEATURE debug_toolbar ) -# If ALLWED_HOSTS has been configured, then we're running on a server and +# If ALLOWED_HOSTS has been configured, then we're running on a server and # can skip looking for a .env file (this assumes that .env files # file is only used for local development and servers use environment variables) if not env("ALLOWED_HOSTS"):