Skip to main content

Django middleware which sets SameSite flag to 'None' for cookies where it is None

Project description

Middleware to work around #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:

pip install django-samesite-none

Put it first in the MIDDLEWARE list in your settings.py:

MIDDLEWARE = [
    "django_samesite_none.middleware.SameSiteNoneMiddleware",
    ...
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-samesite-none-0.0.3.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

django_samesite_none-0.0.3-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page