WAF策略增加“最多检查内容尺寸“选项

This commit is contained in:
刘祥超
2023-08-02 17:00:16 +08:00
parent 10db4e3ccd
commit cc881c070c
8 changed files with 18 additions and 21 deletions

View File

@@ -441,6 +441,14 @@ func (this *HTTPRequest) WAFFingerprint() []byte {
return nil
}
func (this *HTTPRequest) WAFMaxRequestSize() int64 {
var maxRequestSize = firewallconfigs.DefaultMaxRequestBodySize
if this.ReqServer.HTTPFirewallPolicy != nil && this.ReqServer.HTTPFirewallPolicy.MaxRequestBodySize > 0 {
maxRequestSize = this.ReqServer.HTTPFirewallPolicy.MaxRequestBodySize
}
return maxRequestSize
}
// DisableAccessLog 在当前请求中不使用访问日志
func (this *HTTPRequest) DisableAccessLog() {
this.disableLog = true