Skip to content

Commit

Permalink
Merge pull request #3910 from airqo-platform/website2-backend5
Browse files Browse the repository at this point in the history
website-backend: CSRF ISSUE
  • Loading branch information
Baalmart authored Nov 25, 2024
2 parents 728eb1e + 4428a64 commit d205505
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/website/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ def parse_env_list(env_var, default=""):
CORS_ORIGIN_REGEX_WHITELIST = parse_env_list("CORS_ORIGIN_REGEX_WHITELIST")
CSRF_TRUSTED_ORIGINS = parse_env_list("CSRF_TRUSTED_ORIGINS")


# Only allow CSRF cookie over HTTPS in production
CSRF_COOKIE_SECURE = not DEBUG
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True

# Root URL configuration
ROOT_URLCONF = 'core.urls'
Expand Down

0 comments on commit d205505

Please sign in to comment.