From 54eda21f7d7cac93afe513691cb0b53efb8c124a Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 2 Dec 2021 16:09:15 +0800 Subject: [PATCH] =?UTF-8?q?WAF=E8=A7=84=E5=88=99=E9=9B=86=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E5=BF=BD=E7=95=A5=E5=B1=80?= =?UTF-8?q?=E5=9F=9F=E7=BD=91IP=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/servers/components/waf/createSetPopup.go | 2 ++ .../default/servers/components/waf/updateSetPopup.go | 2 ++ .../@default/servers/components/waf/createSetPopup.html | 9 ++++++++- .../@default/servers/components/waf/updateSetPopup.html | 9 ++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/internal/web/actions/default/servers/components/waf/createSetPopup.go b/internal/web/actions/default/servers/components/waf/createSetPopup.go index 88bfca03..0adb2aec 100644 --- a/internal/web/actions/default/servers/components/waf/createSetPopup.go +++ b/internal/web/actions/default/servers/components/waf/createSetPopup.go @@ -73,6 +73,7 @@ func (this *CreateSetPopupAction) RunPost(params struct { RulesJSON []byte Connector string ActionsJSON []byte + IgnoreLocal bool Must *actions.Must }) { @@ -124,6 +125,7 @@ func (this *CreateSetPopupAction) RunPost(params struct { RuleRefs: nil, Rules: rules, Actions: actionConfigs, + IgnoreLocal: params.IgnoreLocal, } 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 4029ccfa..e5ece57c 100644 --- a/internal/web/actions/default/servers/components/waf/updateSetPopup.go +++ b/internal/web/actions/default/servers/components/waf/updateSetPopup.go @@ -97,6 +97,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct { RulesJSON []byte Connector string ActionsJSON []byte + IgnoreLocal bool Must *actions.Must }) { @@ -144,6 +145,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct { setConfig.Connector = params.Connector setConfig.Rules = rules setConfig.Actions = actionConfigs + setConfig.IgnoreLocal = params.IgnoreLocal 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 dd04ea08..fd6561d2 100644 --- a/web/views/@default/servers/components/waf/createSetPopup.html +++ b/web/views/@default/servers/components/waf/createSetPopup.html @@ -18,7 +18,7 @@ - 规则之间的关系 + 规则之间的关系 * @@ -32,6 +32,13 @@ + + 忽略局域网IP + + +

选中后表示如果请求来自局域网IP,则直接跳过当前规则集。

+ + \ No newline at end of file