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

This commit is contained in:
刘祥超
2023-10-01 15:16:39 +08:00
parent 8a0318b4f3
commit 6f230b30e0

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() {