mirror of
https://github.com/open-webui/open-webui
synced 2025-04-22 15:33:21 +00:00
fix
This commit is contained in:
parent
bf0043881a
commit
86c961e342
@ -73,7 +73,6 @@ def get_http_authorization_cred(auth_header: str):
|
|||||||
|
|
||||||
def get_current_user(
|
def get_current_user(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response,
|
|
||||||
auth_token: HTTPAuthorizationCredentials = Depends(bearer_security),
|
auth_token: HTTPAuthorizationCredentials = Depends(bearer_security),
|
||||||
):
|
):
|
||||||
token = None
|
token = None
|
||||||
@ -104,8 +103,6 @@ def get_current_user(
|
|||||||
Users.update_user_last_active_by_id(user.id)
|
Users.update_user_last_active_by_id(user.id)
|
||||||
return user
|
return user
|
||||||
else:
|
else:
|
||||||
response.set_cookie("token", "", expires=0)
|
|
||||||
|
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
detail=ERROR_MESSAGES.UNAUTHORIZED,
|
detail=ERROR_MESSAGES.UNAUTHORIZED,
|
||||||
|
Loading…
Reference in New Issue
Block a user