This commit is contained in:
Timothy Jaeryang Baek committed 2026-02-19 16:29:19 -06:00
1 parent 6ac593209c
commit 91a0301c9e
3 files changed
+447

No files matched your search

+4
View File
@@ -290,6 +290,10 @@ async def get_current_user(
if token is None and "token" in request.cookies:
token = request.cookies.get("token")
# Fallback to request.state.token (set by middleware, e.g. for x-api-key)
if token is None and hasattr(request.state, "token") and request.state.token:
token = request.state.token.credentials
if token is None:
raise HTTPException(status_code=401, detail="Not authenticated")