From d3c8d8fd045b75cc4e3d8145fcfd8cc714bfb12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 7 Jan 2023 09:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4WAF=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=AC=A6=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../http_firewall_rule_operator.go | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/serverconfigs/firewallconfigs/http_firewall_rule_operator.go b/pkg/serverconfigs/firewallconfigs/http_firewall_rule_operator.go index 35d8882..c39efe4 100644 --- a/pkg/serverconfigs/firewallconfigs/http_firewall_rule_operator.go +++ b/pkg/serverconfigs/firewallconfigs/http_firewall_rule_operator.go @@ -125,18 +125,6 @@ var AllRuleOperators = []*RuleOperatorDefinition{ Description: "不包含某个字符串,比如Hello字符串中不包含Hi", CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, }, - { - Name: "包含前缀", - Code: HTTPFirewallRuleOperatorPrefix, - Description: "包含字符串前缀部分,比如/hello前缀会匹配/hello, /hello/world等", - CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, - }, - { - Name: "包含后缀", - Code: HTTPFirewallRuleOperatorSuffix, - Description: "包含字符串后缀部分,比如/hello后缀会匹配/hello, /hi/hello等", - CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, - }, { Name: "包含任一字符串", Code: HTTPFirewallRuleOperatorContainsAny, @@ -149,6 +137,18 @@ var AllRuleOperators = []*RuleOperatorDefinition{ Description: "包含字符串列表中的所有字符串,比如/hello/world必须包含/hello和/world,每行一个字符串", CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, }, + { + Name: "包含前缀", + Code: HTTPFirewallRuleOperatorPrefix, + Description: "包含字符串前缀部分,比如/hello前缀会匹配/hello, /hello/world等", + CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, + }, + { + Name: "包含后缀", + Code: HTTPFirewallRuleOperatorSuffix, + Description: "包含字符串后缀部分,比如/hello后缀会匹配/hello, /hi/hello等", + CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo, + }, { Name: "包含二进制数据", Code: HTTPFirewallRuleOperatorContainsBinary,