diff --git a/internal/web/actions/default/servers/components/waf/createSetPopup.go b/internal/web/actions/default/servers/components/waf/createSetPopup.go index 88cb2ceb..238346c1 100644 --- a/internal/web/actions/default/servers/components/waf/createSetPopup.go +++ b/internal/web/actions/default/servers/components/waf/createSetPopup.go @@ -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) diff --git a/internal/web/actions/default/servers/components/waf/updateSetPopup.go b/internal/web/actions/default/servers/components/waf/updateSetPopup.go index d3560d3d..80875f96 100644 --- a/internal/web/actions/default/servers/components/waf/updateSetPopup.go +++ b/internal/web/actions/default/servers/components/waf/updateSetPopup.go @@ -93,11 +93,12 @@ func (this *UpdateSetPopupAction) RunPost(params struct { GroupId int64 SetId int64 - Name string - RulesJSON []byte - Connector string - ActionsJSON []byte - IgnoreLocal bool + Name string + RulesJSON []byte + Connector string + ActionsJSON []byte + IgnoreLocal bool + IgnoreSearchEngine bool Must *actions.Must }) { @@ -149,6 +150,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct { setConfig.Rules = rules setConfig.Actions = actionConfigs setConfig.IgnoreLocal = params.IgnoreLocal + setConfig.IgnoreSearchEngine = params.IgnoreSearchEngine setConfigJSON, err := json.Marshal(setConfig) if err != nil { diff --git a/web/views/@default/servers/components/waf/createSetPopup.html b/web/views/@default/servers/components/waf/createSetPopup.html index d6176acd..49b17eb4 100644 --- a/web/views/@default/servers/components/waf/createSetPopup.html +++ b/web/views/@default/servers/components/waf/createSetPopup.html @@ -40,10 +40,17 @@
选中后表示如果请求来自局域网IP,则直接跳过当前规则集。
+选中后,表示如果请求来自局域网IP,则直接跳过当前规则集。
+选中后,表示如果请求来自常见搜索引擎的IP,则直接跳过当前规则集。
选中后表示如果请求来自局域网IP,则直接跳过当前规则集。
选中后,表示如果请求来自常见搜索引擎的IP,则直接跳过当前规则集。
+