WAF规则集中增加“允许搜索引擎”选项,可以快速允许搜索引擎访问

This commit is contained in:
GoEdgeLab
2024-05-08 16:42:40 +08:00
parent 60fb184d15
commit d321d0378c
4 changed files with 40 additions and 22 deletions

View File

@@ -78,10 +78,11 @@ func (this *CreateSetPopupAction) RunPost(params struct {
FormType string
// normal
RulesJSON []byte
Connector string
ActionsJSON []byte
IgnoreLocal bool
RulesJSON []byte
Connector string
ActionsJSON []byte
IgnoreLocal bool
IgnoreSearchEngine bool
// code
Code string
@@ -133,16 +134,17 @@ func (this *CreateSetPopupAction) RunPost(params struct {
}
var setConfig = &firewallconfigs.HTTPFirewallRuleSet{
Id: 0,
IsOn: true,
Name: params.Name,
Code: "",
Description: "",
Connector: params.Connector,
RuleRefs: nil,
Rules: rules,
Actions: actionConfigs,
IgnoreLocal: params.IgnoreLocal,
Id: 0,
IsOn: true,
Name: params.Name,
Code: "",
Description: "",
Connector: params.Connector,
RuleRefs: nil,
Rules: rules,
Actions: actionConfigs,
IgnoreLocal: params.IgnoreLocal,
IgnoreSearchEngine: params.IgnoreSearchEngine,
}
setConfigJSON, err = json.Marshal(setConfig)