访问日志可以只记录WAF相关日志

This commit is contained in:
刘祥超
2021-01-26 10:29:09 +08:00
parent 3b22a800f6
commit 35359bd0b3

View File

@@ -32,6 +32,10 @@ func (this *HTTPRequest) log() {
return
}
if ref.FirewallOnly && this.firewallPolicyId == 0 {
return
}
addr := this.RawReq.RemoteAddr
index := strings.LastIndex(addr, ":")
if index > 0 {