From 0cc95c5aa04f3711d05ae15526983775d1da7772 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 15 Jul 2022 12:04:24 +0800 Subject: [PATCH] =?UTF-8?q?cc2=E5=A2=9E=E5=8A=A0=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=B8=B8=E8=A7=81=E6=96=87=E4=BB=B6=E6=89=A9=E5=B1=95=E5=90=8D?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/server/http-firewall-rules.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/web/public/js/components/server/http-firewall-rules.js b/web/public/js/components/server/http-firewall-rules.js index 9e5a2455..9e6a68e9 100644 --- a/web/public/js/components/server/http-firewall-rules.js +++ b/web/public/js/components/server/http-firewall-rules.js @@ -92,6 +92,7 @@ Vue.component("http-firewall-checkpoint-cc", { let keys = [] let period = 60 let threshold = 1000 + let ignoreCommonFiles = false let options = {} if (window.parent.UPDATING_RULE != null) { @@ -113,6 +114,9 @@ Vue.component("http-firewall-checkpoint-cc", { if (options.threshold != null) { threshold = options.threshold } + if (options.ignoreCommonFiles != null && typeof (options.ignoreCommonFiles) == "boolean") { + ignoreCommonFiles = options.ignoreCommonFiles + } let that = this setTimeout(function () { @@ -123,6 +127,7 @@ Vue.component("http-firewall-checkpoint-cc", { keys: keys, period: period, threshold: threshold, + ignoreCommonFiles: ignoreCommonFiles, options: {}, value: threshold } @@ -133,6 +138,9 @@ Vue.component("http-firewall-checkpoint-cc", { }, threshold: function () { this.change() + }, + ignoreCommonFiles: function () { + this.change() } }, methods: { @@ -152,6 +160,11 @@ Vue.component("http-firewall-checkpoint-cc", { } this.value = threshold + let ignoreCommonFiles = this.ignoreCommonFiles + if (typeof ignoreCommonFiles != "boolean") { + ignoreCommonFiles = false + } + this.vCheckpoint.options = [ { code: "keys", @@ -164,6 +177,10 @@ Vue.component("http-firewall-checkpoint-cc", { { code: "threshold", value: threshold + }, + { + code: "ignoreCommonFiles", + value: ignoreCommonFiles } ] } @@ -193,6 +210,13 @@ Vue.component("http-firewall-checkpoint-cc", { + + 忽略常见文件 + + +

忽略js、css、jpg等常见文件名。

+ + ` })