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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file django-samesite-none-0.0.3.tar.gz.

File metadata

  • Download URL: django-samesite-none-0.0.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for django-samesite-none-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ee4a7cecc12a09fbea5322d433b10bcb790db551029bc2bb4820d33633159aad
MD5 a02b47776759e8b6ecad766104f62baa
BLAKE2b-256 4ef405be89e089776036c34558b01d786b5aea0a87197c30148f2e77c27087be

See more details on using hashes here.

File details

Details for the file django_samesite_none-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: django_samesite_none-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for django_samesite_none-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b7920a69a1a510c319dbbd29b8b9f590468d5ed2d402e1d6749d7e353eb7d9
MD5 f09d3ec9ffee5d60e68e870cc8ee2c9a
BLAKE2b-256 d4a6c7d30d3a92932f66bdc35b8bd166b0fdb040a55252ccdd45e1b8c5fcd739

See more details on using hashes here.

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