Fix middleware schema caching error #7

Merged
NyxiumYuuki merged 13 commits from claude/fix-middleware-schema-cache-01SXnBSQQ8ptLgqViF4UsUYx into master 2025-12-01 03:03:24 +01:00
Showing only changes of commit fe71704bf8 - Show all commits

View file

@ -54,6 +54,11 @@ class AuthenticationMiddleware(BaseHTTPMiddleware):
if request.url.path == "/health": if request.url.path == "/health":
return await call_next(request) return await call_next(request)
# Skip authentication for OPTIONS requests (CORS preflight)
# OPTIONS requests don't include Authorization headers by design
if request.method == "OPTIONS":
return await call_next(request)
# Check for Authorization header # Check for Authorization header
auth_header = request.headers.get("Authorization") auth_header = request.headers.get("Authorization")