WAF策略中增加验证码相关定制设置

This commit is contained in:
GoEdgeLab
2022-05-21 11:17:53 +08:00
parent caf8aef10b
commit 4dccc2929b
18 changed files with 274 additions and 91 deletions

View File

@@ -66,7 +66,7 @@ func (this *RuleSet) Init(waf *WAF) error {
// action instances
this.actionInstances = []ActionInterface{}
for _, action := range this.Actions {
instance := FindActionInstance(action.Code, action.Options)
var instance = FindActionInstance(action.Code, action.Options)
if instance == nil {
remotelogs.Error("WAF_RULE_SET", "can not find instance for action '"+action.Code+"'")
continue
@@ -79,6 +79,7 @@ func (this *RuleSet) Init(waf *WAF) error {
}
this.actionInstances = append(this.actionInstances, instance)
waf.AddAction(instance)
}
// sort actions