强制记录攻击日志

This commit is contained in:
刘祥超
2022-04-21 09:40:05 +08:00
parent 553deda20b
commit adfdd5f1b6
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
}
}
// 添加统计