diff --git a/backend/app/middleware/security.py b/backend/app/middleware/security.py index 6b9d42e..b58d2f6 100644 --- a/backend/app/middleware/security.py +++ b/backend/app/middleware/security.py @@ -52,14 +52,37 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware): # Content Security Policy (CSP) # Restricts sources of content that can be loaded - # TODO: Remove 'unsafe-inline' and 'unsafe-eval' and use nonces/hashes instead + # + # SECURITY TODO: Current CSP includes 'unsafe-inline' and 'unsafe-eval' which + # weaken XSS protection. To remove these: + # + # For script-src 'unsafe-inline': + # 1. Move all inline