cookiecutter / cookiecutter-django

Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
https://cookiecutter-django.readthedocs.io
BSD 3-Clause "New" or "Revised" License
11.77k stars 2.83k forks source link

Enhancing the security of cookies #5102

Closed Mogost closed 2 weeks ago

Mogost commented 1 month ago

Description

I've added a Secure- prefix for cookies to enhance security by ensuring that cookies are only sent over HTTPS connections. It's an additional layer of protection that might be easily used.

Rationale

This change is necessary to improve the security of cookie handling by ensuring cookies are only transmitted over secure HTTPS connections. This mitigates the risk of cookie theft and session hijacking.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#cookie_prefixes