secure

Lightweight modern Python library to add security headers (CSP, HSTS, etc.) to Django, Flask, FastAPI, and more. Secure defaults or fully customizable.

MIT License

Downloads
341K
Stars
785
Committers
10

Bot releases are visible (Hide)

secure - v0.3.0 Latest Release

Published by cak over 3 years ago

Breaking Changes

Changelog:

  • Full redesign of Secure API
  • Removal of cookie support
  • Add type hints
  • Add support for FastAPI
  • Change Feature-Policy to Permissions-Policy (#10)
secure - v0.2.1

Published by cak almost 6 years ago

Merry Christmas! 🎅

  • Add support for Masonite
  • Remove trailing semicolon from Feature Policy
  • Rename Feature.Values.All to Feature.Values.All_ (shadowed built-in name 'all')
  • Modify hug implementation for SecureHeaders and SecureCookie
  • Upper-case SameSite Enum (SameSite.LAX / SameSite.STRICT)
  • Add SecureHeaders and SecureCookie docstrings
secure - v0.2.0

Published by cak almost 6 years ago

  • Add policy builder SecurePolicies (policies.py)
  • Add Expires header for legacy browser support
  • Add max-age directive to Cache-control header
  • Rename XXS argument to XXP
  • Use native Flask set-cookie
Package Rankings
Top 42.6% on Conda-forge.org
Top 2.34% on Pypi.org
Badges
Extracted from project README
PyPI Version Python Versions Ruff Downloads License GitHub Stars