Skip to content

Samesite Cookie & Header Warnings #261

Answered by JoelEdem
9mido asked this question in Q&A
Discussion options

You must be logged in to vote

You need to enable https on your application. The development server does not support https so you'll have to do that when you set up your production server.
then set
SESSION_COOKIE_SAMESITE = None
LANGUAGE_COOKIE_SAMESITE = None
CSRF_COOKIE_SAMESITE = None
SESSION_COOKIE_SECURE = True
LANGUAGE_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True

you can find documentation about the alternate values for samesite here:
https://docs.djangoproject.com/en/3.0/ref/settings/#session-cookie-secure

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by thibaudcolas
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #213 on January 26, 2022 22:02.