fix(honeypot): 蜜罐封禁与 enable_auto_ban 解耦 + 泄露扫描后缀匹配
- autoban: 新增 RecordHoneypot 独立通道(不受 enabled 约束)+ 独立阈值/时长; IsBanned 不再因 enable_auto_ban=false 而忽略已有封禁 - honeypot: 新增 honeypotSuffixes 后缀匹配,覆盖 /backup.zip、/db.sql、/id_rsa.pem - 新增配置 honeypot_threshold / honeypot_ban_minutes - 补测试:autoban/honeypot_test.go、route 侧禁用自动封禁仍封禁
This commit is contained in:
@@ -43,7 +43,6 @@ func autobanMiddleware(b *autoban.Banner, hp *honeypot.Honeypot) flamego.Handler
|
||||
if kind != autoban.KindNone {
|
||||
defer b.Record(ip, path, kind)
|
||||
}
|
||||
|
||||
// 让下游业务路由先执行,敏感路径的计数延后到响应返回后记录。
|
||||
ctx.Next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user