修复安全与备份问题

This commit is contained in:
lizhilun
2026-07-12 17:50:04 +08:00
parent 77cd66a854
commit b728ae08e4
7 changed files with 65 additions and 30 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ if (isProduction && !jwtSecret) {
module.exports = {
// 服务器配置
port: process.env.PORT || 3000,
host: process.env.HOST || '0.0.0.0',
host: process.env.HOST || (isProduction ? '127.0.0.1' : '0.0.0.0'),
trustProxy: process.env.TRUST_PROXY || (isProduction ? 'loopback' : false),
// JWT 配置
jwtSecret: jwtSecret || 'dev-only-gamer-order-secret',