国家/地区统计时上传流量、攻击量等信息

This commit is contained in:
刘祥超
2021-12-05 18:57:30 +08:00
parent f0e8dd1baa
commit 30ac3118e2
3 changed files with 58 additions and 26 deletions

View File

@@ -212,11 +212,6 @@ func (this *HTTPRequest) doBegin() {
}
}
// 统计
if this.web.StatRef != nil && this.web.StatRef.IsOn {
this.doStat()
}
// 跳转
if len(this.web.HostRedirects) > 0 {
if this.doHostRedirect() {
@@ -298,6 +293,12 @@ func (this *HTTPRequest) doEnd() {
if metrics.SharedManager.HasHTTPMetrics() {
this.doMetricsResponse()
}
// 统计
if this.web.StatRef != nil && this.web.StatRef.IsOn {
// 放到最后执行
this.doStat()
}
}
// RawURI 原始的请求URI