feat: production hardening - CORS whitelist, strong password, tokenVersion revoke, VIP card hashing, admin secret
This commit is contained in:
13
.env.example
13
.env.example
@@ -1,13 +1,13 @@
|
||||
# 数据库连接
|
||||
DATABASE_URL="postgresql://postgres:password@localhost:5432/maqt?schema=public"
|
||||
|
||||
# JWT 密钥(请修改为随机字符串)
|
||||
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
|
||||
# JWT 密钥(务必修改为随机长字符串)
|
||||
JWT_SECRET="change-me-to-a-random-64-char-string"
|
||||
|
||||
# JWT 过期时间
|
||||
JWT_EXPIRES_IN="7d"
|
||||
|
||||
# 数据加密密钥(32字节,请修改)
|
||||
# 数据加密密钥(32字节,务必修改)
|
||||
ENCRYPTION_KEY="0123456789abcdef0123456789abcdef"
|
||||
|
||||
# 服务端口
|
||||
@@ -16,5 +16,8 @@ PORT=3001
|
||||
# 环境
|
||||
NODE_ENV="development"
|
||||
|
||||
# VIP 卡密批次密钥(用于生成卡密签名)
|
||||
BATCH_SECRET="your-batch-secret-key"
|
||||
# CORS 允许的来源 (逗号分隔)
|
||||
ALLOWED_ORIGINS="http://localhost:5173,app://.,file://"
|
||||
|
||||
# 管理员密钥 (用于 /api/admin 端点)
|
||||
ADMIN_SECRET="change-me-to-random"
|
||||
|
||||
Reference in New Issue
Block a user