内容压缩支持brotli和deflate

This commit is contained in:
GoEdgeLab
2021-09-29 20:12:27 +08:00
parent 84dd0d662b
commit 2a8846b4be
23 changed files with 486 additions and 322 deletions

View File

@@ -3,7 +3,8 @@ Vue.component("http-firewall-block-options", {
data: function () {
return {
blockOptions: this.vBlockOptions,
statusCode: this.vBlockOptions.statusCode
statusCode: this.vBlockOptions.statusCode,
timeout: this.vBlockOptions.timeout
}
},
watch: {
@@ -14,6 +15,14 @@ Vue.component("http-firewall-block-options", {
} else {
this.blockOptions.statusCode = statusCode
}
},
timeout: function (v) {
let timeout = parseInt(v)
if (isNaN(timeout)) {
this.blockOptions.timeout = 0
} else {
this.blockOptions.timeout = timeout
}
}
},
template: `<div>
@@ -31,6 +40,16 @@ Vue.component("http-firewall-block-options", {
<textarea rows="3" v-model="blockOptions.body"></textarea>
</td>
</tr>
<tr>
<td>超时时间</td>
<td>
<div class="ui input right labeled">
<input type="text" v-model="timeout" style="width: 5em" maxlength="6"/>
<span class="ui label">秒</span>
</div>
<p class="comment">触发阻止动作时封锁客户端IP的时间。</p>
</td>
</tr>
</table>
</div>
`