强制记录攻击日志

This commit is contained in:
GoEdgeLab
2022-04-21 09:40:05 +08:00
parent 850ee8e944
commit abd0d118f5
3 changed files with 55 additions and 44 deletions

View File

@@ -213,6 +213,9 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
if ruleSet.HasAttackActions() {
this.isAttack = true
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
this.forceLog = true
}
}
// 添加统计
@@ -275,6 +278,9 @@ func (this *HTTPRequest) checkWAFResponse(firewallPolicy *firewallconfigs.HTTPFi
if ruleSet.HasAttackActions() {
this.isAttack = true
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
this.forceLog = true
}
}
// 添加统计