forked from phoenix/litellm-mirror
Merge pull request #2953 from BerriAI/litellm_fix_sec_issue
[security fix - Low Severity] - disable demo accounts
This commit is contained in:
commit
69c095b768
1 changed files with 6 additions and 4 deletions
|
@ -7656,10 +7656,12 @@ async def login(request: Request):
|
|||
**{"user_role": "proxy_admin", "duration": "1hr", "key_max_budget": 5, "models": [], "aliases": {}, "config": {}, "spend": 0, "user_id": key_user_id, "team_id": "litellm-dashboard"} # type: ignore
|
||||
)
|
||||
else:
|
||||
response = {
|
||||
"token": "sk-gm",
|
||||
"user_id": "litellm-dashboard",
|
||||
}
|
||||
raise ProxyException(
|
||||
message="No Database connected. Set DATABASE_URL in .env. If set, use `--detailed_debug` to debug issue.",
|
||||
type="auth_error",
|
||||
param="DATABASE_URL",
|
||||
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
)
|
||||
key = response["token"] # type: ignore
|
||||
litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "")
|
||||
if litellm_dashboard_ui.endswith("/"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue