refactor: mock清理+安全配置+通用组件+菜单优化
P0安全: SECRET_KEY/ADMIN_PASSWORD/CORS环境变量化, seed仅admin P1Mock: mock.ts 301->88行, 删8数据mock+5generateMock, net-1300行 P2组件: useToast/useFetchList+ConfirmDialog/FormDialog P3菜单: menuSections/menuItems->constants/menu.ts P4API: NotificationsPage/WorkflowPage重写+RolesPage演示 测试: 1050passed, tsc clean
This commit is contained in:
1 parent
ec3a03cf38
commit
8b921c6c83
33 files changed
+1734
-2006
No files matched your search
+17
-9
@@ -1,12 +1,20 @@
|
||||
# DataGuard Backend Configuration
|
||||
ENV=development
|
||||
DEBUG=true
|
||||
SECRET_KEY=change-me-to-a-secure-random-string
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES=30
|
||||
# ── SQL-Platform 生产环境配置 ──
|
||||
# 复制此文件为 .env 并修改为实际值
|
||||
|
||||
# Platform Database (SQLite)
|
||||
# 环境: development / production
|
||||
ENV=production
|
||||
DEBUG=false
|
||||
|
||||
# JWT 密钥(生产环境必须更换为随机强密钥)
|
||||
# 生成方式: python -c "import secrets; print(secrets.token_urlsafe(32))"
|
||||
SECRET_KEY=dev-secret-key-change-in-production
|
||||
|
||||
# 管理员初始密码(首次启动创建 admin 用户时使用)
|
||||
ADMIN_PASSWORD=123456
|
||||
|
||||
# 数据库
|
||||
DATABASE_URL=sqlite+aiosqlite:///./sqlite3.db
|
||||
|
||||
# Default Admin
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_PASSWORD=123456
|
||||
# CORS 允许的前端域名(生产环境必填,逗号分隔)
|
||||
# CORS_ORIGINS=https://sql.example.com,https://sql2.example.com
|
||||
CORS_ORIGINS=
|
||||
Reference in new issue
Block a user