mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-10 00:22:03 +00:00
fix(proxy_server.py): allow jwt public key ttl to be passed as os.environ
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user