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

This commit is contained in:
GoEdgeLab
2021-01-26 10:29:09 +08:00
parent af0773c0ac
commit dfb5ad6f78

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 {