From 87e724cd9e7764af6732de0ca58887a57335e33a Mon Sep 17 00:00:00 2001 From: Javier de la Puente Date: Mon, 20 May 2024 18:25:00 +0200 Subject: [PATCH] django-allowed-hosts fixes --- charm/tests/integration/conftest.py | 2 +- netbox/netbox/configuration.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/charm/tests/integration/conftest.py b/charm/tests/integration/conftest.py index dab1ae788..b3bfacc08 100644 --- a/charm/tests/integration/conftest.py +++ b/charm/tests/integration/conftest.py @@ -244,7 +244,7 @@ async def netbox_app_fixture( resources=resources, config={ "django-debug": False, - "django-allowed-hosts": '["*"]', + "django-allowed-hosts": '*', "aws-endpoint-url": s3_netbox_configuration["endpoint"], }, ) diff --git a/netbox/netbox/configuration.py b/netbox/netbox/configuration.py index b6894f83c..da909b91c 100644 --- a/netbox/netbox/configuration.py +++ b/netbox/netbox/configuration.py @@ -16,10 +16,7 @@ # This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write # access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name. # - -# The double prefix DJANGO_DJANGO is probably related to discrepancies between the charmcraft version -# and the paas-app-charmer version. Wait until charmcraft is merged in main to report. -ALLOWED_HOSTS = json.loads(os.environ.get("DJANGO_DJANGO_ALLOWED_HOSTS", "[]")) +ALLOWED_HOSTS = json.loads(os.environ.get("DJANGO_ALLOWED_HOSTS", "[]")) # PostgreSQL database configuration. See the Django documentation for a complete list of available parameters: # https://docs.djangoproject.com/en/stable/ref/settings/#databases