mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-31 02:26:36 +08:00
默认记录WAF的条件从检测到攻击改为所有匹配WAF规则集的请求
This commit is contained in:
@@ -206,6 +206,10 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
|
||||
}
|
||||
|
||||
if ruleSet != nil {
|
||||
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
|
||||
this.forceLog = true
|
||||
}
|
||||
|
||||
if ruleSet.HasSpecialActions() {
|
||||
this.firewallPolicyId = firewallPolicy.Id
|
||||
this.firewallRuleGroupId = types.Int64(ruleGroup.Id)
|
||||
@@ -213,9 +217,6 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
|
||||
|
||||
if ruleSet.HasAttackActions() {
|
||||
this.isAttack = true
|
||||
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
|
||||
this.forceLog = true
|
||||
}
|
||||
}
|
||||
|
||||
// 添加统计
|
||||
@@ -271,6 +272,10 @@ func (this *HTTPRequest) checkWAFResponse(firewallPolicy *firewallconfigs.HTTPFi
|
||||
}
|
||||
|
||||
if ruleSet != nil {
|
||||
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
|
||||
this.forceLog = true
|
||||
}
|
||||
|
||||
if ruleSet.HasSpecialActions() {
|
||||
this.firewallPolicyId = firewallPolicy.Id
|
||||
this.firewallRuleGroupId = types.Int64(ruleGroup.Id)
|
||||
@@ -278,9 +283,6 @@ func (this *HTTPRequest) checkWAFResponse(firewallPolicy *firewallconfigs.HTTPFi
|
||||
|
||||
if ruleSet.HasAttackActions() {
|
||||
this.isAttack = true
|
||||
if firewallPolicy.Log != nil && firewallPolicy.Log.IsOn {
|
||||
this.forceLog = true
|
||||
}
|
||||
}
|
||||
|
||||
// 添加统计
|
||||
|
||||
Reference in New Issue
Block a user