mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-10 12:00:28 +08:00
[waf]支持包含二进制、不支持二进制等操作符;支持对参数值编解码
This commit is contained in:
@@ -93,11 +93,20 @@ func (this *WAFManager) convertWAF(policy *firewallconfigs.HTTPFirewallPolicy) (
|
||||
r := &waf.Rule{
|
||||
Description: rule.Description,
|
||||
Param: rule.Param,
|
||||
ParamFilters: []*waf.ParamFilter{},
|
||||
Operator: rule.Operator,
|
||||
Value: rule.Value,
|
||||
IsCaseInsensitive: rule.IsCaseInsensitive,
|
||||
CheckpointOptions: rule.CheckpointOptions,
|
||||
}
|
||||
|
||||
for _, paramFilter := range rule.ParamFilters {
|
||||
r.ParamFilters = append(r.ParamFilters, &waf.ParamFilter{
|
||||
Code: paramFilter.Code,
|
||||
Options: paramFilter.Options,
|
||||
})
|
||||
}
|
||||
|
||||
s.Rules = append(s.Rules, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user