mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(user_api_key_auth.py): more precisely expand scope to handle 'basic' tokens
This commit is contained in:
parent
742e3cbccf
commit
5fdbfcee44
4 changed files with 3 additions and 4 deletions
|
@ -85,8 +85,10 @@ def _get_bearer_token(
|
|||
):
|
||||
if api_key.startswith("Bearer "): # ensure Bearer token passed in
|
||||
api_key = api_key.replace("Bearer ", "") # extract the token
|
||||
elif api_key.startswith("Basic "):
|
||||
api_key = api_key.replace("Basic ", "") # handle langfuse input
|
||||
else:
|
||||
api_key = api_key
|
||||
api_key = ""
|
||||
return api_key
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue