Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

SESSION_COOKIES_SAMESITE has to be 'strict' or 'lax' #19

@hazymoon22

Description

@hazymoon22
  • django-cookies-samesite version: 0.5
  • Django version: 2.2.7
  • Python version: 3.7
  • Operating System: Linux

Description

Chrome now explicitly want us to set the SameSite = "None" to use cross domain cookies.
Django version 2.2.7 does not allow for SESSION_COOKIES_SAMESITE = "None".

What I Did

Install django-cookies-samesite with: pip install django-cookies-samesite
Add this on top of MIDDLEWARE: 'django_cookies_samesite.middleware.CookiesSameSite'
Set SESSION_COOKIES_SAMESITE = "None" in settings.py
Deploy the app with Docker

Result

Encountered this error when access to the webapp:
ValueError: samesite must be "lax" or "strict".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions