From 8266d8abd20f157d298718245e66170bf76c7e57 Mon Sep 17 00:00:00 2001 From: Raman Prasad Date: Mon, 21 Aug 2023 12:11:16 -0400 Subject: [PATCH] update TRUSTED_ORIGINS --- deploy/k8s_maker/dpcreator_specs_01.py | 2 +- .../k8s_maker/rendered/demo.dpcreator.org_08_2023_0821.yaml | 4 ++-- server/opendp_project/settings/azure_test_01.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/k8s_maker/dpcreator_specs_01.py b/deploy/k8s_maker/dpcreator_specs_01.py index 5aef3daa..50db4f66 100644 --- a/deploy/k8s_maker/dpcreator_specs_01.py +++ b/deploy/k8s_maker/dpcreator_specs_01.py @@ -55,7 +55,7 @@ # dpcreator_container_tag="dpcreator-demo", # Tag for Images # # ALLOWED_HOSTS="13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0", # Django setting - TRUSTED_ORIGINS="13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0", # Django setting + TRUSTED_ORIGINS="https://demo.dpcreator.org,http://demo.dpcreator.org,http://127.0.0.1", # Django setting # loadBalancerIP="13.82.125.69", # k8s LoadBalancer. # diff --git a/deploy/k8s_maker/rendered/demo.dpcreator.org_08_2023_0821.yaml b/deploy/k8s_maker/rendered/demo.dpcreator.org_08_2023_0821.yaml index a4bc08e7..43ff73af 100644 --- a/deploy/k8s_maker/rendered/demo.dpcreator.org_08_2023_0821.yaml +++ b/deploy/k8s_maker/rendered/demo.dpcreator.org_08_2023_0821.yaml @@ -218,7 +218,7 @@ spec: - name: ALLOWED_HOSTS value: "13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0" - name: TRUSTED_ORIGINS - value: "13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0" + value: "https://demo.dpcreator.org,http://demo.dpcreator.org,http://127.0.0.1" - name: DB_USER valueFrom: secretKeyRef: @@ -296,7 +296,7 @@ spec: - name: ALLOWED_HOSTS value: "13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0" - name: TRUSTED_ORIGINS - value: "13.82.125.69,demo.dpcreator.org,127.0.0.1,0.0.0.0" + value: "https://demo.dpcreator.org,http://demo.dpcreator.org,http://127.0.0.1" - name: DB_USER valueFrom: secretKeyRef: diff --git a/server/opendp_project/settings/azure_test_01.py b/server/opendp_project/settings/azure_test_01.py index faaae607..ca367a38 100644 --- a/server/opendp_project/settings/azure_test_01.py +++ b/server/opendp_project/settings/azure_test_01.py @@ -7,9 +7,9 @@ ASGI_APPLICATION = "opendp_project.asgi_azure.application" # to test... -CORS_ALLOW_ALL_ORIGINS = False +CORS_ALLOW_ALL_ORIGINS = True -CORS_ALLOWED_ORIGINS = os.getenv('TRUSTED_ORIGINS', "TRUSTED_ORIGINS_ENV_VAR_MISSING").split(',') +#CORS_ALLOWED_ORIGINS = os.getenv('TRUSTED_ORIGINS', "TRUSTED_ORIGINS_ENV_VAR_MISSING").split(',') CSRF_TRUSTED_ORIGINS = os.getenv('TRUSTED_ORIGINS', "TRUSTED_ORIGINS_ENV_VAR_MISSING").split(',') # Let nginx serve static files