forked from phoenix/litellm-mirror
fix(proxy_server.py): allow jwt public key ttl to be passed as os.environ
This commit is contained in:
parent
ef4c85522c
commit
0c2ae7a90e
2 changed files with 4 additions and 1 deletions
|
@ -42,4 +42,4 @@ general_settings:
|
|||
alerting: ["slack"]
|
||||
litellm_jwtauth:
|
||||
admin_jwt_scope: "litellm_proxy_admin"
|
||||
public_key_ttl: 600
|
||||
public_key_ttl: os.environ/LITELLM_PUBLIC_KEY_TTL
|
|
@ -3000,6 +3000,9 @@ async def startup_event():
|
|||
|
||||
## JWT AUTH ##
|
||||
if general_settings.get("litellm_jwtauth", None) is not None:
|
||||
for k, v in general_settings["litellm_jwtauth"].items():
|
||||
if isinstance(v, str) and v.startswith("os.environ/"):
|
||||
general_settings["litellm_jwtauth"][k] = litellm.get_secret(v)
|
||||
litellm_jwtauth = LiteLLM_JWTAuth(**general_settings["litellm_jwtauth"])
|
||||
else:
|
||||
litellm_jwtauth = LiteLLM_JWTAuth()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue