diff --git a/app/core/middleware.py b/app/core/middleware.py index 324ddf0..fc0d836 100644 --- a/app/core/middleware.py +++ b/app/core/middleware.py @@ -45,7 +45,7 @@ class CSRFMiddleware(BaseHTTPMiddleware): # 2. CSRF token validation (double-submit pattern) # Skip CSRF token check for auth endpoints (login/password-reset) path = request.url.path - if path.endswith("/auth/login") or path.endswith("/auth/logout") or "/password-reset" in path: + if path.endswith("/auth/login") or path.endswith("/auth/logout") or "/password-reset" in path or path.endswith("/api/v1/errors") or path == "/api/v1/errors": return await call_next(request) csrf_header = request.headers.get("x-csrf-token")