mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix: address review feedback on master key check
- Downgrade ValueError to critical log (no hard failure on startup) - Change length threshold from 16 to 32 to match warning message - Fix typo: reccomended -> recommended - Remove unnecessary f-string prefix
This commit is contained in:
parent
5e42d4b9d8
commit
db456b33d0
1 changed files with 6 additions and 6 deletions
|
|
@ -3095,13 +3095,13 @@ class ProxyConfig:
|
|||
|
||||
if master_key is not None and isinstance(master_key, str):
|
||||
if master_key == "sk-1234":
|
||||
raise ValueError(
|
||||
f"LITELLM_MASTER_KEY is set to the default master-key granting proxy admin access, please change it to something stronger"
|
||||
)
|
||||
if len(master_key) < 16:
|
||||
verbose_proxy_logger.critical(
|
||||
"LITELLM_MASTER_KEY is set to the default master key granting proxy admin access, please change it to something stronger"
|
||||
)
|
||||
if len(master_key) < 32:
|
||||
verbose_proxy_logger.warning(
|
||||
"A key of at least 32 characters is reccomended for production"
|
||||
)
|
||||
"A key of at least 32 characters is recommended for production"
|
||||
)
|
||||
|
||||
### USER API KEY CACHE IN-MEMORY TTL ###
|
||||
user_api_key_cache_ttl = general_settings.get(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue