Skip to content

Commit 7e79f8d

Browse files
committed
refac
1 parent 2584542 commit 7e79f8d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

backend/open_webui/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,9 @@ async def dispatch(self, request: Request, call_next):
13291329
token = None
13301330

13311331
if auth_header:
1332-
scheme, token = auth_header.split(" ")
1332+
parts = auth_header.split(" ", 1)
1333+
if len(parts) == 2:
1334+
token = parts[1]
13331335

13341336
# Only apply restrictions if an sk- API key is used
13351337
if token and token.startswith("sk-"):

0 commit comments

Comments
 (0)