feat: add CASL authorization and AI configuration

This commit is contained in:
2026-07-11 14:25:34 +08:00
parent 8f0991a51f
commit 1e1c476bc3
59 changed files with 7733 additions and 120 deletions

View File

@@ -13,3 +13,19 @@ DB_SYNCHRONIZE=false
JWT_SECRET=change-me-to-a-random-string-at-least-32-chars
JWT_EXPIRES_IN=24h
PORT=3000
# ---- AI 模型配置 ----
# AES-256-GCM 加密主密钥,用于加密存储 API Key
# 生产环境必须设置生成方式openssl rand -hex 32
# 格式64 位 hex推荐或 base64 编码后恰好 32 字节
# 示例 hexopenssl rand -hex 32
# 示例 base64openssl rand -base64 32
AI_CONFIG_ENCRYPTION_KEY=
# AI API Key 环境变量回退(可选)
# 若数据库未保存 Key将从该环境变量读取
# 环境变量 Key 不可从页面覆盖或清除
# AI_API_KEY=
# 允许内网地址作为 OPENAI_COMPATIBLE 的 baseUrl仅内网部署使用
# AI_ALLOW_PRIVATE_BASE_URL=true