减少一些不必要的访问统计

This commit is contained in:
刘祥超
2023-11-19 09:10:37 +08:00
parent 7fea67a2b5
commit ba19a9f4c4
4 changed files with 16 additions and 0 deletions

View File

@@ -251,6 +251,7 @@ func (this *WAF) MatchRequest(req requests.Request, writer http.ResponseWriter,
var rawPath = req.WAFRaw().URL.Path
if rawPath == CaptchaPath {
req.DisableAccessLog()
req.DisableStat()
captchaValidator.Run(req, writer, defaultCaptchaType)
return
}
@@ -258,6 +259,7 @@ func (this *WAF) MatchRequest(req requests.Request, writer http.ResponseWriter,
// Get 302验证
if rawPath == Get302Path {
req.DisableAccessLog()
req.DisableStat()
get302Validator.Run(req, writer)
return
}