调整WAF和其他配置的优先级顺序

This commit is contained in:
GoEdgeLab
2023-10-01 15:16:39 +08:00
parent afc452f441
commit b322f74a72

View File

@@ -204,6 +204,14 @@ func (this *HTTPRequest) Do() {
return
}
// WAF
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
if this.doWAFRequest() {
this.doEnd()
return
}
}
// UAM
if !this.isHealthCheck {
if this.web.UAM != nil {
@@ -234,14 +242,6 @@ func (this *HTTPRequest) Do() {
}
}
// WAF
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
if this.doWAFRequest() {
this.doEnd()
return
}
}
// 防盗链
if !this.isSubRequest && this.web.Referers != nil && this.web.Referers.IsOn {
if this.doCheckReferers() {