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等常见文件名。

+ + ` })