update
This commit is contained in:
parent
6e5e581bec
commit
78f0e9dd84
@ -10,6 +10,10 @@ async def get_current_user(
|
|||||||
access_token: Optional[str] = Cookie(None),
|
access_token: Optional[str] = Cookie(None),
|
||||||
db: Session = Depends(get_db)
|
db: Session = Depends(get_db)
|
||||||
) -> UserDB:
|
) -> UserDB:
|
||||||
|
|
||||||
|
print(f"authorization: {authorization}")
|
||||||
|
print(f"access_token: {access_token}")
|
||||||
|
|
||||||
# 优先使用Header中的token,其次使用Cookie中的token
|
# 优先使用Header中的token,其次使用Cookie中的token
|
||||||
token = None
|
token = None
|
||||||
if authorization and authorization.startswith("Bearer "):
|
if authorization and authorization.startswith("Bearer "):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user