mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-30 08:40:26 +08:00
WAF策略增加“最多检查内容尺寸“选项
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifySuccess("保存成功", "/servers/components/waf/policy?firewallPolicyId=" + this.firewallPolicyId)
|
||||
|
||||
this.maxRequestBodySize = this.firewallPolicy.maxRequestBodySize
|
||||
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
||||
if (this.maxRequestBodySize == 0) {
|
||||
this.maxRequestBodySizeFormat = ""
|
||||
}
|
||||
|
||||
this.changeMaxRequestBodySize = function (v) {
|
||||
if (v.toString().length == 0) {
|
||||
this.maxRequestBodySize = 0
|
||||
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
||||
return
|
||||
}
|
||||
let size = parseInt(v)
|
||||
if (!isNaN(size) && size >= 0) {
|
||||
this.maxRequestBodySize = size
|
||||
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user