Fix middleware schema caching error #7
1 changed files with 5 additions and 0 deletions
|
|
@ -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")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue