Skip to content

Commit

Permalink
fix: add env var for CSRF_TRUSTED_ORIGINS
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMoore committed Aug 14, 2024
1 parent be5f5a2 commit 6e7c0b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/reusable-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
CATALOGUE_URL: ${{ vars.CATALOGUE_URL }}
DEBUG: ${{ vars.DEBUG }}
DJANGO_ALLOWED_HOSTS: ${{ vars.DJANGO_ALLOWED_HOSTS }}
CSRF_TRUSTED_ORIGINS: ${{ vars.CSRF_TRUSTED_ORIGINS }}
DJANGO_LOG_LEVEL: ${{ vars.DJANGO_LOG_LEVEL }}
SENTRY_DSN_WORKAROUND: ${{ vars.SENTRY_DSN_WORKAROUND }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,5 @@
USE_I18N = True
LANGUAGE_CODE = "en"
LOCALE_PATHS = [BASE_DIR / "locale"]

CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS", "").split(" ")
2 changes: 2 additions & 0 deletions deployments/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
value: "$AZURE_REDIRECT_URI"
- name: AZURE_AUTHORITY
value: "$AZURE_AUTHORITY"
- name: CSRF_TRUSTED_ORIGINS
value: "${CSRF_TRUSTED_ORIGINS}"
- name: SECRET_KEY
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit 6e7c0b0

Please sign in to comment.