From a15f0e30513a0a9b1fc42089e383fa7cb172b5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 21 Apr 2022 19:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=AE=B0=E5=BD=95WAF?= =?UTF-8?q?=E7=9A=84=E6=9D=A1=E4=BB=B6=E4=BB=8E=E6=A3=80=E6=B5=8B=E5=88=B0?= =?UTF-8?q?=E6=94=BB=E5=87=BB=E6=94=B9=E4=B8=BA=E6=89=80=E6=9C=89=E5=8C=B9?= =?UTF-8?q?=E9=85=8DWAF=E8=A7=84=E5=88=99=E9=9B=86=E7=9A=84=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_waf.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/nodes/http_request_waf.go b/internal/nodes/http_request_waf.go index a1e3eb1..b994c89 100644 --- a/internal/nodes/http_request_waf.go +++ b/internal/nodes/http_request_waf.go @@ -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 - } } // 添加统计