From 6ffc552bd8e598f7412a5aea00597a419ca014fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 20 Jan 2024 21:23:59 +0800 Subject: [PATCH] =?UTF-8?q?WAF=E5=85=81=E8=AE=B8ALLOW=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=89=E6=95=88=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/http-firewall-actions-box.js | 36 ++++++++++++++++++- .../server/http-firewall-actions-view.js | 5 +++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/web/public/js/components/server/http-firewall-actions-box.js b/web/public/js/components/server/http-firewall-actions-box.js index 21f7ced2..ac81ef1e 100644 --- a/web/public/js/components/server/http-firewall-actions-box.js +++ b/web/public/js/components/server/http-firewall-actions-box.js @@ -85,6 +85,8 @@ Vue.component("http-firewall-actions-box", { ipListLevels: [], // 动作参数 + allowScope: "global", + blockTimeout: "", blockTimeoutMax: "", blockScope: "global", @@ -140,6 +142,9 @@ Vue.component("http-firewall-actions-box", { }) this.actionOptions = {} }, + allowScope: function (v) { + this.actionOptions["scope"] = v + }, blockTimeout: function (v) { v = parseInt(v) if (isNaN(v)) { @@ -279,6 +284,8 @@ Vue.component("http-firewall-actions-box", { this.actionOptions = {} // 动作参数 + this.allowScope = "global" + this.blockTimeout = "" this.blockTimeoutMax = "" this.blockScope = "global" @@ -363,6 +370,11 @@ Vue.component("http-firewall-actions-box", { } break case "allow": + if (config.options != null && config.options.scope != null && config.options.scope.length > 0) { + this.allowScope = config.options.scope + } else { + this.allowScope = "global" + } break case "log": break @@ -674,6 +686,13 @@ Vue.component("http-firewall-actions-box", {
{{config.name}} ({{config.code.toUpperCase()}}) + + + [分组] + [网站] + [网站和策略] + + :封禁时长{{config.options.timeout}}-{{config.options.timeoutMax}} @@ -712,7 +731,7 @@ Vue.component("http-firewall-actions-box", { :{{config.options.groupName}} / {{config.options.setName}} - +   [所有网站] [当前网站] @@ -735,6 +754,21 @@ Vue.component("http-firewall-actions-box", { + + + 有效范围 + + +

跳过当前分组其他规则集,继续执行其他分组的规则集。

+

跳过当前网站所有的规则集。

+

跳过当前网站和网站对应WAF策略所有的规则集。

+ + + 封禁范围 diff --git a/web/public/js/components/server/http-firewall-actions-view.js b/web/public/js/components/server/http-firewall-actions-view.js index 3364c0ec..678f3ff8 100644 --- a/web/public/js/components/server/http-firewall-actions-view.js +++ b/web/public/js/components/server/http-firewall-actions-view.js @@ -6,6 +6,11 @@ Vue.component("http-firewall-actions-view", { {{action.name}} ({{action.code.toUpperCase()}})
[{{action.options.status}}] + + [分组] + [网站] + [网站和策略] +