refactor: 架构缺陷 6-12 修复
6. SECRET_KEY 从硬编码改为环境变量读取,未设置时自动生成随机值 7. 登录时 session 存储 tenant_id,auth_manager 返回用户的 tenant_id 8. 前端共享状态集中声明并添加注释,标注每个状态由哪个模块管理 9. 数据库启动时自动检测并添加缺失的 tenant_id 列(SQLite ADD COLUMN 迁移) 10. Webhook handler 添加文档说明双通道互斥建议 11. LLM chat_completion 添加自动重试(max_retries=2),服务端错误和超时自动重试 12. 知识库向量化器和 Embedding 禁用日志从 INFO 降为 DEBUG,减少噪音
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
# The host the web server will bind to.
|
||||
SERVER_HOST=0.0.0.0
|
||||
|
||||
# Flask session 加密密钥(生产环境必须设置固定值,否则每次重启 session 失效)
|
||||
SECRET_KEY=your-random-secret-key-here
|
||||
|
||||
# The port for the main Flask web server.
|
||||
SERVER_PORT=5001
|
||||
|
||||
|
||||
Reference in New Issue
Block a user