From 5b67a856243a63bfc70b2d3b7901642157e00d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 1 Mar 2023 19:18:22 +0800 Subject: [PATCH] =?UTF-8?q?WAF=E9=98=BB=E6=AD=A2=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E4=B9=9F=E5=A2=9E=E5=8A=A0=E6=9C=80=E5=A4=A7=E5=B0=81=E7=A6=81?= =?UTF-8?q?=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/http-firewall-actions-box.js | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) 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 d614ce24..acaf2ac0 100644 --- a/web/public/js/components/server/http-firewall-actions-box.js +++ b/web/public/js/components/server/http-firewall-actions-box.js @@ -73,6 +73,7 @@ Vue.component("http-firewall-actions-box", { // 动作参数 blockTimeout: "", + blockTimeoutMax: "", blockScope: "global", captchaLife: "", @@ -122,6 +123,14 @@ Vue.component("http-firewall-actions-box", { this.actionOptions["timeout"] = v } }, + blockTimeoutMax: function (v) { + v = parseInt(v) + if (isNaN(v)) { + this.actionOptions["timeoutMax"] = 0 + } else { + this.actionOptions["timeoutMax"] = v + } + }, blockScope: function (v) { this.actionOptions["scope"] = v }, @@ -237,6 +246,7 @@ Vue.component("http-firewall-actions-box", { // 动作参数 this.blockTimeout = "" + this.blockTimeoutMax = "" this.blockScope = "global" this.captchaLife = "" @@ -298,9 +308,13 @@ Vue.component("http-firewall-actions-box", { switch (config.code) { case "block": this.blockTimeout = "" + this.blockTimeoutMax = "" if (config.options.timeout != null || config.options.timeout > 0) { this.blockTimeout = config.options.timeout.toString() } + if (config.options.timeoutMax != null || config.options.timeoutMax > 0) { + this.blockTimeoutMax = config.options.timeoutMax.toString() + } if (config.options.scope != null && config.options.scope.length > 0) { this.blockScope = config.options.scope } else { @@ -584,7 +598,7 @@ Vue.component("http-firewall-actions-box", { {{config.name}} ({{config.code.toUpperCase()}}) - :有效期{{config.options.timeout}}秒 + :封禁时长{{config.options.timeout}}-{{config.options.timeoutMax}} :有效期{{config.options.life}}秒 @@ -642,6 +656,17 @@ Vue.component("http-firewall-actions-box", { + + 封禁范围 + + +

只封禁用户对当前网站服务的访问,其他服务不受影响。

+

封禁用户对所有网站服务的访问。

+ + 封禁时长 @@ -652,14 +677,13 @@ Vue.component("http-firewall-actions-box", { - 封禁范围 + 最大封禁时长 - -

只封禁用户对当前网站服务的访问,其他服务不受影响。

-

封禁用户对所有网站服务的访问。

+
+ + +
+

选填项。如果同时填写了封禁时长和最大封禁时长,则会在两者之间随机选择一个数字作为最终的封禁时长。