mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(mcp): return non-Bearer auth tokens as-is in _extract_bearer_token
This commit is contained in:
parent
4800446b2f
commit
d9e09c6b14
1 changed files with 4 additions and 2 deletions
|
|
@ -1177,8 +1177,10 @@ class MCPServerManager:
|
|||
# raw_headers may have lowercase keys depending on the ASGI server
|
||||
normalized = {k.lower(): v for k, v in raw_headers.items()}
|
||||
auth_value = normalized.get("authorization")
|
||||
if auth_value and auth_value.startswith("Bearer "):
|
||||
return auth_value[len("Bearer "):]
|
||||
if auth_value:
|
||||
if auth_value.startswith("Bearer "):
|
||||
return auth_value[len("Bearer "):]
|
||||
return auth_value
|
||||
return None
|
||||
|
||||
def _build_stdio_env(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue