WAF规则校验错误不阻断执行

This commit is contained in:
GoEdgeLab
2021-09-25 19:41:10 +08:00
parent c4f7d86648
commit d2bf6690b2
3 changed files with 20 additions and 2 deletions

View File

@@ -232,3 +232,12 @@ var AllRuleOperators = []*RuleOperatorDefinition{
CaseInsensitive: HTTPFirewallRuleCaseInsensitiveNo,
},
}
func FindRuleOperatorName(code string) string {
for _, operator := range AllRuleOperators {
if operator.Code == code {
return operator.Name
}
}
return ""
}