Lightweight modern Python library to add security headers (CSP, HSTS, etc.) to Django, Flask, FastAPI, and more. Secure defaults or fully customizable.
This release is a significant update and redesign of the secure.py library, bringing modern Python 3.10+ support, enhanced framework integration, and breaking changes to improve usability and security.
Key highlights:
Full API overhaul for a more Pythonic design, leveraging type hints and modern language features.
Enhanced support for asynchronous frameworks like FastAPI, Sanic, and Starlette.
Improved documentation, including middleware examples for all supported frameworks.
Updated default security headers, CSP examples, and more robust server header handling for Uvicorn users.
This release is a significant update and redesign of the
secure.py
library, bringing modern Python 3.10+ support, enhanced framework integration, and breaking changes to improve usability and security.Key highlights: