src/dazzle_back/runtime/security_middleware.py¶
Generated: 2026-03-30T04:38:48.146797+00:00
Commit: 615f1354a103
Language: python
Scope: dazzle_back
Purpose¶
Security middleware for DNR-Back applications.
Provides configurable security based on security profile: - Security headers (X-Frame-Options, X-Content-Type-Options, HSTS, CSP) - CORS configuration - Request origin validation
Key Exports¶
SecurityHeadersConfigCORSConfigconfigure_cors_for_profileconfigure_headers_for_profilecreate_security_headers_middlewareapply_security_middlewareSecurityHeadersMiddlewaredispatch
Dependencies¶
Imports¶
__future__.annotationsdataclasses.dataclasstyping.Anystarlette.middleware.base.BaseHTTPMiddlewarestarlette.requests.Requeststarlette.responses.Responsefastapi.middleware.cors.CORSMiddleware
Event Interactions¶
None detected.
Invariants and Assumptions¶
- allow_origins=custom_origins, # Must be explicitly configured
Tests¶
tests/integration/test_runtime_e2e.pytests/integration/test_runtime_pipeline.pytests/unit/test_runtime_test_routes.pytests/unit/test_runtime_services.pytests/unit/test_runtime_mcp_tools.py
Notes¶
This page was automatically generated by tools/gen_reference_docs.py.