Fix: cross-origin session cookie not sent after upgrading to Django 3 (SESSION_COOKIE_SAMESITE)
2019-12-30 12:27 (6 years ago)

By default, Django3 sets the following in its settings:
SESSION_COOKIE_SAMESITE = 'Lax'
This is the default configuration.
To disable it:
SESSION_COOKIE_SAMESITE = None
After making this change, either log out or clear your cookies and log in again.
Note that this will weaken security.
Related posts
Switching the Logged-in User in Django Using the Django Shell
Using Vue.js Webpack Dev Server Proxy for Social Provider Authentication with Django + Python Social Auth
Failure of Django CSRF Token Authentication: ELB -> Apache2 -> uwsgi
Downloading Files with Requests Using Selenium Webdriver Session Cookies
Please rate this article (No signup or login required)
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.