https://github.com/zvyn/django-samesite-none
Django middleware which sets SameSite flag to 'None' for cookies where it is None
https://github.com/zvyn/django-samesite-none
Last synced: about 1 month ago
JSON representation
Django middleware which sets SameSite flag to 'None' for cookies where it is None
- Host: GitHub
- URL: https://github.com/zvyn/django-samesite-none
- Owner: zvyn
- Created: 2020-03-11T11:29:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T10:44:12.000Z (over 5 years ago)
- Last Synced: 2025-04-23T23:07:58.251Z (12 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Middleware to work around [#30862](https://code.djangoproject.com/ticket/30862)
Chrome started rolling out changes that brake Django sites with intentionally
empty `SameSite` cookie settings.
This middleware sets the value `"None"` on those cookies explicitly.
Also sets `Secure` to `True` for all altered cookies.
# Installation
Get it from PyPi:
```bash
pip install django-samesite-none
```
Put it first in the `MIDDLEWARE` list in your `settings.py`:
```
MIDDLEWARE = [
"django_samesite_none.middleware.SameSiteNoneMiddleware",
...
]
```