forked from phoenix/litellm-mirror
security fix - disable demo accounts
This commit is contained in:
parent
1c1b0f929f
commit
96cd038a73
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
|
**{"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:
|
else:
|
||||||
response = {
|
raise ProxyException(
|
||||||
"token": "sk-gm",
|
message="No Database connected. Set DATABASE_URL in .env. If set, use `--detailed_debug` to debug issue.",
|
||||||
"user_id": "litellm-dashboard",
|
type="auth_error",
|
||||||
}
|
param="DATABASE_URL",
|
||||||
|
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
|
)
|
||||||
key = response["token"] # type: ignore
|
key = response["token"] # type: ignore
|
||||||
litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "")
|
litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "")
|
||||||
if litellm_dashboard_ui.endswith("/"):
|
if litellm_dashboard_ui.endswith("/"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue