Skip to content

Commit

Permalink
Add more strict CORS-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mhieta committed Dec 2, 2023
1 parent 4014f5b commit f92650d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
DEBUG=(bool, False),
DJANGO_SECRET_KEY=(str, ""),
ALLOWED_HOSTS=(list, ["*"]),
CORS_ALLOWED_ORIGINS=(list, ["http://localhost:3000"]),
CSRF_TRUSTED_ORIGINS=(list, ["https://*.hel.fi", "https://*.hel.ninja"]),
DATABASE_URL=(str, "sqlite:////tmp/my-tmp-sqlite.db"),
TALPA_NAMESPACE=(str, "asukaspysakointi"),
Expand Down Expand Up @@ -213,9 +214,8 @@
TRAFICOM_VERIFY_SSL = env("TRAFICOM_VERIFY_SSL")
TRAFICOM_CHECK = env("TRAFICOM_CHECK")

# cors
CORS_ORIGIN_ALLOW_ALL = True

# CORS
CORS_ALLOWED_ORIGINS = env("CORS_ALLOWED_ORIGINS")
CORS_ALLOW_HEADERS = list(default_headers) + [
"x-authorization", # for passing Helsinki Profile API token form frontend
]
Expand Down

0 comments on commit f92650d

Please sign in to comment.