feat: add CASL authorization and AI configuration
This commit is contained in:
16
.env.example
16
.env.example
@@ -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 字节
|
||||
# 示例 hex:openssl rand -hex 32
|
||||
# 示例 base64:openssl rand -base64 32
|
||||
AI_CONFIG_ENCRYPTION_KEY=
|
||||
|
||||
# AI API Key 环境变量回退(可选)
|
||||
# 若数据库未保存 Key,将从该环境变量读取
|
||||
# 环境变量 Key 不可从页面覆盖或清除
|
||||
# AI_API_KEY=
|
||||
|
||||
# 允许内网地址作为 OPENAI_COMPATIBLE 的 baseUrl(仅内网部署使用)
|
||||
# AI_ALLOW_PRIVATE_BASE_URL=true
|
||||
|
||||
Reference in New Issue
Block a user