在对IP封禁时,不写入访问日志

This commit is contained in:
刘祥超
2020-11-09 11:02:29 +08:00
parent 5682c9ba3e
commit 1a6b05f81b
3 changed files with 18 additions and 0 deletions

View File

@@ -13,6 +13,10 @@ var requestId int64 = 1_0000_0000_0000_0000
// 日志
func (this *HTTPRequest) log() {
if this.disableLog {
return
}
// 计算请求时间
this.requestCost = time.Since(this.requestFromTime).Seconds()