Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
53915c4
chore(build): clean up pyproject.toml for 2.0.0
cak Sep 28, 2025
bc89714
fix: specify type for params in Secure class constructor
cak Sep 28, 2025
c33dd0f
fix(headers): expose cached headers as immutable Mapping
cak Oct 25, 2025
6f737bb
fix(headers): clarify sync errors and add safe fallback
cak Oct 25, 2025
acafd8c
chore(build): clean up pyproject.toml for Ruff and setuptools
cak Oct 26, 2025
119b319
style(secure): apply Ruff-driven refactors and import sorting
cak Oct 26, 2025
1424067
Preserve multi-valued headers in setters
cak Oct 26, 2025
b90f1b9
fix(headers): robust error handling in setting headers
cak Oct 26, 2025
fab44bf
secure: validate header names/values before write
cak Oct 26, 2025
d7d73d8
refactor(headers): streamline validation and normalization logic
cak Oct 29, 2025
edd5c19
headers: add deduplicate_headers() and simplify header_items()
cak Nov 8, 2025
0b33484
headers: add allowlist_headers(
cak Nov 8, 2025
af6d0aa
Fix internal header invariants and normalization pipeline
cak Dec 9, 2025
eb7b916
refactor: enforce synchronous header setting in set_headers()
cak Dec 9, 2025
a17dfd8
refactor: enforce async-only header setting in apply_headers()
cak Dec 9, 2025
8930356
refactor: remove runtime_checkable decorator from protocol classes
cak Dec 9, 2025
4cc4c4f
fix: handle duplicate headers during normalization and clarify async …
cak Dec 9, 2025
229c2c5
refactor: improve documentation and type hints for header management …
cak Dec 10, 2025
2a5fbb7
refactor: add noqa comments to suppress linting warnings in header va…
cak Dec 10, 2025
a6f1b38
refactor: enhance error handling and validation logic in Secure class…
cak Dec 10, 2025
acd92d0
refactor: streamline Secure class initialization with preset configur…
cak Dec 10, 2025
0e1407d
docs: update README for clarity and consistency, enhancing descriptio…
cak Dec 10, 2025
14d22c9
feat: add new security headers and enhance Secure class with modern p…
cak Dec 11, 2025
6ed8538
feat: enhance Cache-Control header with max-age directive and add req…
cak Dec 11, 2025
b8f7f17
feat: enhance Content Security Policy with additional directives for …
cak Dec 11, 2025
fe60457
feat: add initial uv.lock file for package management
cak Dec 11, 2025
17a8b13
feat: update Cache-Control documentation and enhance directive descri…
cak Dec 11, 2025
418f611
feat: enhance Cross-Origin-Embedder-Policy documentation and add dire…
cak Dec 12, 2025
0a6cb98
feat: refine Cache-Control header implementation and enhance document…
cak Dec 12, 2025
4530530
feat: enhance Content Security Policy implementation with structured …
cak Dec 12, 2025
69b9a10
feat: enhance Cross-Origin-Opener-Policy implementation with improved…
cak Dec 12, 2025
6f027e8
feat: enhance Cross-Origin-Resource-Policy implementation with improv…
cak Dec 13, 2025
b682275
feat: enhance Permissions-Policy implementation with improved validat…
cak Dec 13, 2025
3bdedec
feat: improve Referrer-Policy implementation with enhanced validation…
cak Dec 13, 2025
deddde4
feat: enhance Strict-Transport-Security implementation with structure…
cak Dec 13, 2025
124100f
feat: enhance Cache-Control documentation with improved structure and…
cak Dec 13, 2025
bbf2935
feat: enhance Content-Security-Policy documentation with improved str…
cak Dec 13, 2025
49bfd8e
feat: enhance Cross-Origin-Embedder-Policy documentation with improve…
cak Dec 13, 2025
e9022e6
feat: enhance Cross-Origin-Opener-Policy documentation with improved …
cak Dec 13, 2025
cfd2704
feat: add Cross-Origin-Resource-Policy documentation with purpose, be…
cak Dec 13, 2025
5379d5b
feat: enhance Permissions-Policy documentation with improved clarity,…
cak Dec 13, 2025
44c4cd3
feat: enhance Referrer-Policy documentation with improved clarity, st…
cak Dec 13, 2025
076f0f7
feat: enhance Strict-Transport-Security documentation with improved c…
cak Dec 13, 2025
d11d0fc
feat: enhance X-Content-Type-Options documentation with improved clar…
cak Dec 13, 2025
3667601
feat: enhance XDnsPrefetchControl documentation and improve method cl…
cak Dec 13, 2025
68b90a5
feat: add X-DNS-Prefetch-Control documentation with usage examples an…
cak Dec 13, 2025
9bc6d9c
feat: enhance X-Frame-Options documentation with improved clarity, st…
cak Dec 13, 2025
ba51c1d
feat: enhance X-Frame-Options documentation with improved clarity, st…
cak Dec 13, 2025
4b52ab4
feat: enhance X-Permitted-Cross-Domain-Policies documentation with im…
cak Dec 13, 2025
01b3cc3
feat: add X-Permitted-Cross-Domain-Policies documentation with detail…
cak Dec 13, 2025
86179eb
feat: enhance Cache-Control class with improved directive handling an…
cak Dec 13, 2025
502fbb3
feat: update Secure class to enhance cache handling and permissions p…
cak Dec 13, 2025
472ed11
feat: update usage documentation with enhanced Cache-Control directiv…
cak Dec 13, 2025
b4265d9
feat: add comprehensive unit tests for Secure class header management
cak Dec 13, 2025
4c3689f
test: fix expected Cache-Control header values in unit tests
cak Dec 13, 2025
df81893
feat: add test suite for the top-level secure package
cak Dec 13, 2025
686e027
refactor: simplify header dictionary comprehensions in unit tests
cak Dec 13, 2025
05fda9d
feat: enhance security headers in README with updated Cache-Control a…
cak Dec 13, 2025
18d7f95
feat: implement header item resolution with override support in Secur…
cak Dec 13, 2025
5c2c9b6
feat: add validation and normalization tests for custom headers in Se…
cak Dec 13, 2025
16d5750
docs: clarify header normalization process in README
cak Dec 13, 2025
c73e7a9
feat: add header value normalization to various headers for improved …
cak Dec 13, 2025
c1b025b
feat: add unit tests for header consistency and validation in test_he…
cak Dec 13, 2025
c0f3c2e
feat: update documentation for v2.0.0 migration, including package na…
cak Dec 13, 2025
af8e86e
feat: add additional security headers validation in TestSecure class
cak Dec 13, 2025
7421c19
feat: enhance header tests with additional assertions and new test ca…
cak Dec 13, 2025
a388684
feat: update MockResponseAwaitableSetHeader to return Awaitable in se…
cak Dec 13, 2025
63ded3a
feat: update CHANGELOG for v2.0.0 release, detailing breaking changes…
cak Dec 13, 2025
6b80c8d
feat: update security presets to include a new BALANCED option and re…
cak Dec 13, 2025
3b77267
feat: update documentation to reflect changes in presets and defaults…
cak Dec 13, 2025
e9220e8
feat: update tests to validate Balanced preset defaults and exclusion…
cak Dec 13, 2025
b1ee387
feat: add SecureASGIMiddleware and SecureWSGIMiddleware for enhanced …
cak Dec 14, 2025
ca8bdd9
feat: refactor multi_ok parameter to use Iterable for SecureASGIMiddl…
cak Dec 14, 2025
44a5e64
feat: add middleware documentation for SecureWSGIMiddleware and Secur…
cak Dec 14, 2025
3c4d12f
feat: update per-file ignores in Ruff configuration for tests to enha…
cak Dec 14, 2025
239001f
feat: add unit tests for Secure header management, validating header …
cak Dec 14, 2025
4c4f2bb
move middleware tests into /middleware
cak Dec 14, 2025
b9251b4
feat: reorganize imports in __init__.py for better readability and ma…
cak Dec 14, 2025
1babaf4
feat: improve string representation of headers in Secure class for cl…
cak Dec 14, 2025
671f1fd
feat: add tests for string representation normalization and package e…
cak Dec 14, 2025
d5162f8
feat: add default value fields to security headers for consistency an…
cak Dec 14, 2025
1b6f76c
feat: enhance documentation and structure of CustomHeader class for c…
cak Dec 14, 2025
6c8ce01
feat: add expected header names and support for clear resets in heade…
cak Dec 14, 2025
18ffc96
feat: update documentation with migration notes for v2.0.0 release an…
cak Dec 14, 2025
2c37884
feat: update __all__ exports to include XDnsPrefetchControl and XPerm…
cak Dec 14, 2025
bf04383
feat: add unit tests for package exports in secure, headers, and midd…
cak Dec 14, 2025
f6caa29
feat: add linting step to CI workflow using ruff
cak Dec 14, 2025
d4e3691
feat: format default header value in ContentSecurityPolicy docstring …
cak Dec 14, 2025
1701d37
feat: refactor field definitions for XPermittedCrossDomainPolicies cl…
cak Dec 14, 2025
56e17e1
feat: add CrossOriginResourcePolicy to imports and exports for consis…
cak Dec 14, 2025
dd27fd8
feat: add CrossOriginResourcePolicy to secure package exports test
cak Dec 14, 2025
303900a
feat: enhance middleware documentation and normalize header handling
cak Dec 15, 2025
0256594
feat: enhance ASGI typing and add middleware factory method for compa…
cak Dec 15, 2025
50490bb
feat: improve header setting logic for response objects and enhance e…
cak Dec 15, 2025
49f065c
feat: refine ASGI typing aliases and enhance middleware documentation
cak Dec 15, 2025
71ed91e
feat: add FastAPI and Flask middleware examples to README
cak Dec 15, 2025
b6a3b78
feat: refine ASGI typing aliases and improve header normalization fun…
cak Dec 15, 2025
0055fb1
feat: enhance WSGI typing aliases and improve header normalization in…
cak Dec 15, 2025
826e7c0
feat: refine ASGI typing aliases and enhance ASGIApp definition
cak Dec 15, 2025
47b7b37
feat: add Shiny ASGI middleware example to README
cak Dec 15, 2025
37c4120
feat: refine ASGI typing aliases and improve middleware type handling
cak Dec 15, 2025
58e67eb
fix: update Secure instantiation in aiohttp example for clarity
cak Dec 15, 2025
43ba24d
fix: update ResponseProtocol definition to use TypeAlias for clarity
cak Dec 15, 2025
5f719a7
fix: correct license declaration and update classifiers in pyproject.…
cak Dec 15, 2025
175b6bc
fix: enhance type casting for response headers handling in Secure class
cak Dec 15, 2025
d166640
fix: add Dash and Shiny framework integration guides to README
cak Dec 15, 2025
bf974f1
fix: update configuration guide to clarify default security headers a…
cak Dec 15, 2025
53ceed7
fix: add Dash and Shiny framework integration examples to documentation
cak Dec 15, 2025
79a72d0
fix: update installation guide to include `uv` installation instructions
cak Dec 15, 2025
609f56e
fix: correct reference to secure.MULTI_OK in middleware documentation
cak Dec 15, 2025
120da9f
docs: add contributing guidelines for project contributions
cak Dec 15, 2025
3aa7ab3
docs: add Code of Conduct to outline community expectations and behavior
cak Dec 15, 2025
25c5da7
docs: enhance security header documentation by removing content refer…
cak Dec 15, 2025
eb9a8ef
docs: add Cross-Origin-Resource-Policy and additional security header…
cak Dec 15, 2025
0cc3d78
fix: update version to 2.0.0rc1 and adjust license format in pyprojec…
cak Dec 16, 2025
ce8ac36
fix: correct license format and add missing classifier for MIT License
cak Dec 16, 2025
cd030aa
fix: remove redundant classifier for MIT License in pyproject.toml
cak Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add CrossOriginResourcePolicy to imports and exports for consis…
…tency
  • Loading branch information
cak committed Dec 14, 2025
commit 56e17e1652a841802161699f65ca04fb0298bd0d
2 changes: 2 additions & 0 deletions secure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .headers.content_security_policy import ContentSecurityPolicy
from .headers.cross_origin_embedder_policy import CrossOriginEmbedderPolicy
from .headers.cross_origin_opener_policy import CrossOriginOpenerPolicy
from .headers.cross_origin_resource_policy import CrossOriginResourcePolicy
from .headers.custom_header import CustomHeader
from .headers.permissions_policy import PermissionsPolicy
from .headers.referrer_policy import ReferrerPolicy
Expand All @@ -28,6 +29,7 @@
"ContentSecurityPolicy",
"CrossOriginEmbedderPolicy",
"CrossOriginOpenerPolicy",
"CrossOriginResourcePolicy",
"CustomHeader",
"PermissionsPolicy",
"Preset",
Expand Down