Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow hostnames to be configured as regex for cors headers #2424

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions aws/backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"name": "CORS_ALLOWED_ORIGINS",
"value": "[\"https://care.coronasafe.in\", \"https://careapi.coronasafe.in\", \"https://care.ohc.network\", \"https://careapi.ohc.network\", \"https://status.10bedicu.org\", \"http://localhost:4000\"]"
},
{
"name": "CORS_ALLOWED_ORIGIN_REGEXES",
"value": "[\"^https://.*--care-egov-staging\\.netlify\\.app$\"]"
},
{
"name": "CURRENT_DOMAIN",
"value": "https://care.ohc.network"
Expand Down
1 change: 1 addition & 0 deletions config/settings/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
)
# https://github.com/adamchainz/django-cors-headers#cors_allowed_origins-sequencestr
CORS_ALLOWED_ORIGINS = env.json("CORS_ALLOWED_ORIGINS", default=[])
CORS_ALLOWED_ORIGIN_REGEXES = env.json("CORS_ALLOWED_ORIGIN_REGEXES", default=[])

# TEMPLATES
# ------------------------------------------------------------------------------
Expand Down