mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
refac
This commit is contained in:
parent
258454276e
commit
7e79f8d1c6
1 changed files with 3 additions and 1 deletions
|
|
@ -1329,7 +1329,9 @@ class APIKeyRestrictionMiddleware(BaseHTTPMiddleware):
|
|||
token = None
|
||||
|
||||
if auth_header:
|
||||
scheme, token = auth_header.split(" ")
|
||||
parts = auth_header.split(" ", 1)
|
||||
if len(parts) == 2:
|
||||
token = parts[1]
|
||||
|
||||
# Only apply restrictions if an sk- API key is used
|
||||
if token and token.startswith("sk-"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue