修改推送数据格式

This commit is contained in:
2025-07-02 21:05:33 +08:00
parent 318c6b5cc1
commit f347e1bd9c
9 changed files with 137 additions and 22 deletions

View File

@ -12,11 +12,19 @@ module.exports = {
env: process.env.NODE_ENV || 'development'
},
sse: {
heartbeatInterval: 15000, // 15
heartbeatInterval: 30000, // 30
allowedOrigins: '*', //process.env.ALLOWED_ORIGINS?.split(',') || ['http://localhost:3001']
},
rateLimit: {
windowMs: 15 * 60 * 1000, // 15分钟
max: 100 // 每个IP限制100个请求
},
redis: {
url: process.env.REDIS_URL || 'redis://localhost:6379',
database: process.env.REDIS_DB || 1, // 默认使用DB1
socket: {
reconnectStrategy: (retries) => Math.min(retries * 100, 5000)
},
ttl: 86400
}
};