feat: 添加 API 文档路由、扩展用户列表字段、修复 CORS 配置

- Dockerfile.app: 添加 /docs、/redoc、/openapi.json 的 nginx 代理规则
- routes.py: 管理员用户列表接口增加 allowed_providers/endpoints/models 字段
- main.py: 修复 CORS_ORIGINS=* 时 credentials 配置冲突问题
This commit is contained in:
fawney19
2026-01-07 17:31:31 +08:00
parent 42dc64246c
commit 00f6fafcfc
3 changed files with 16 additions and 2 deletions

View File

@@ -273,6 +273,9 @@ class AdminListUsersAdapter(AdminApiAdapter):
"email": u.email,
"username": u.username,
"role": u.role.value,
"allowed_providers": u.allowed_providers,
"allowed_endpoints": u.allowed_endpoints,
"allowed_models": u.allowed_models,
"quota_usd": u.quota_usd,
"used_usd": u.used_usd,
"total_usd": getattr(u, "total_usd", 0),