mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(proxy_server.py): fix admin allowed routes
This commit is contained in:
parent
595a2a5b1b
commit
a33b9221da
5 changed files with 144 additions and 26 deletions
|
@ -167,10 +167,17 @@ class JWTHandler:
|
|||
for key in keys:
|
||||
if kid is not None and key == kid:
|
||||
public_key = keys[key]
|
||||
elif (
|
||||
kid is not None
|
||||
and isinstance(key, dict)
|
||||
and key.get("kid", None) is not None
|
||||
and key["kid"] == kid
|
||||
):
|
||||
public_key = key
|
||||
|
||||
if public_key is None:
|
||||
raise Exception(
|
||||
f"No matching public key found. kid={kid}, keys_url={keys_url}, cached_keys={cached_keys}"
|
||||
f"No matching public key found. kid={kid}, keys_url={keys_url}, cached_keys={cached_keys}, len(keys)={len(keys)}"
|
||||
)
|
||||
|
||||
return public_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue