Skip to content

Commit

Permalink
update TRUSTED_ORIGINS
Browse files Browse the repository at this point in the history
  • Loading branch information
raprasad committed Aug 21, 2023
1 parent 3ccee63 commit 8266d8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deploy/k8s_maker/dpcreator_specs_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions server/opendp_project/settings/azure_test_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8266d8a

Please sign in to comment.