secure v2.0.0rc1
A release-candidate for secure v2.0.0 focused on a cleaner public API, modern presets, first-class ASGI/WSGI middleware, and safer header application/validation across frameworks.
Highlights
- New preset model with a recommended default:
Preset.BALANCED - New ASGI + WSGI middleware for framework-agnostic integration
- New header pipeline helpers for allowlisting, deduping, and validation/normalization
- Expanded header coverage and improved docs, examples, and migration guidance
Breaking changes
- Presets redesigned and defaults changed
- Added
Preset.BALANCED, now the recommended default. Secure.with_default_headers()now equalsSecure.from_preset(Preset.BALANCED).Preset.BASICtargets Helmet.js default parity.Preset.STRICTno longer enables by default (opt-in separately).
- Added