cc2增加忽略常见文件扩展名选项

This commit is contained in:
GoEdgeLab
2022-07-15 12:04:24 +08:00
parent feeaea7285
commit 0cc95c5aa0

View File

@@ -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", {
<input type="text" v-model="threshold" style="width: 6em" maxlength="8"/>
</td>
</tr>
<tr>
<td>忽略常见文件</td>
<td>
<checkbox v-model="ignoreCommonFiles"></checkbox>
<p class="comment">忽略js、css、jpg等常见文件名。</p>
</td>
</tr>
</table>
</div>`
})