diff --git a/docs/middleware.yaml b/docs/middleware.yaml index c2e2110..24efbb1 100644 --- a/docs/middleware.yaml +++ b/docs/middleware.yaml @@ -145,34 +145,6 @@ - Validate cryptographic strength of token generator - Cache static parts of base context to reduce async overhead -loadControllersMiddleware: - purpose: Dynamically loads controllers and models; attaches them to request object. - lifecycleRole: Early middleware before route handlers needing controllers and models. - dependencies: - upstream: [] - downstream: - - route handlers expecting req.controllers and req.models - dataFlow: - inputs: None external; relies on file system and code modules - outputs: - - Adds req.controllers and req.models - sideEffects: None beyond request object augmentation - performanceAndScalability: - bottlenecks: - - Failures loading controllers due to missing/invalid files - - Increased startup time with many controllers - concurrency: None - securityAndStability: - validation: Must ensure controller interface consistency - vulnerabilities: - - Risk of executing malicious code in dynamic loading - architectureAssessment: - coupling: Loose coupling; dynamic import - abstraction: Dynamic module loading abstraction - recommendations: - - Cache loaded controllers outside request lifecycle - - Fail fast on load errors - csrfToken: purpose: Provides CSRF protection by setting token cookie and exposing token to templates. lifecycleRole: Early middleware before state-changing routes requiring CSRF protection.