服务端安全加固:多维限流(按 IP/按门店)+ 敏感接口独立速率上限抵御 DDoS/刷接口; 登录暴力破解新增按来源 IP 锁定;反代后正确识别真实客户端 IP; 门店 custom_fields 轻量配置(录入默认值)透传保存。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2Wdwo7SmgBJU37cBrkhPK
This commit is contained in:
@@ -28,12 +28,15 @@ func InitConfig() {
|
||||
RefreshExpireH: 168,
|
||||
},
|
||||
Session: config.SessionConfig{
|
||||
LimitDesktop: 2,
|
||||
LimitMobile: 2,
|
||||
LimitWeb: 2,
|
||||
MaxFailures: 5,
|
||||
LockMinutes: 15,
|
||||
LimitDesktop: 2,
|
||||
LimitMobile: 2,
|
||||
LimitWeb: 2,
|
||||
MaxFailures: 5,
|
||||
IPMaxFailures: 20,
|
||||
LockMinutes: 15,
|
||||
},
|
||||
// 测试默认关闭限流,避免压测式用例触发 429;限流逻辑由 ratelimit_test.go 显式开启验证。
|
||||
RateLimit: config.RateLimitConfig{Enabled: false},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user