实现单个服务的带宽限制(商业版)

This commit is contained in:
GoEdgeLab
2021-10-21 17:09:51 +08:00
parent 53ca6a7da1
commit 1015221e90
2 changed files with 31 additions and 0 deletions

View File

@@ -137,6 +137,13 @@ func (this *HTTPRequest) Do() {
}
}
// 带宽限制
if this.Server.BandwidthLimit != nil && this.Server.BandwidthLimit.IsOn && !this.Server.BandwidthLimit.IsEmpty() && this.Server.BandwidthLimitStatus != nil && this.Server.BandwidthLimitStatus.IsValid() {
this.doBandwidthLimit()
this.doEnd()
return
}
// WAF
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
if this.doWAFRequest() {