mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-11 22:00:25 +08:00
修复5秒盾验证可能受WAF影响不能工作的问题
This commit is contained in:
@@ -210,6 +210,22 @@ func (this *HTTPRequest) Do() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UAM
|
||||||
|
var uamIsCalled = false
|
||||||
|
if !this.isHealthCheck {
|
||||||
|
if this.web.UAM == nil && this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn {
|
||||||
|
this.web.UAM = this.ReqServer.UAM
|
||||||
|
}
|
||||||
|
|
||||||
|
if this.web.UAM != nil && this.web.UAM.IsOn && this.isUAMRequest() {
|
||||||
|
uamIsCalled = true
|
||||||
|
if this.doUAM() {
|
||||||
|
this.doEnd()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WAF
|
// WAF
|
||||||
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
|
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
|
||||||
if this.doWAFRequest() {
|
if this.doWAFRequest() {
|
||||||
@@ -219,16 +235,8 @@ func (this *HTTPRequest) Do() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UAM
|
// UAM
|
||||||
if !this.isHealthCheck {
|
if !this.isHealthCheck && !uamIsCalled {
|
||||||
if this.web.UAM != nil {
|
if this.web.UAM != nil && this.web.UAM.IsOn {
|
||||||
if this.web.UAM.IsOn {
|
|
||||||
if this.doUAM() {
|
|
||||||
this.doEnd()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn {
|
|
||||||
this.web.UAM = this.ReqServer.UAM
|
|
||||||
if this.doUAM() {
|
if this.doUAM() {
|
||||||
this.doEnd()
|
this.doEnd()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -4,7 +4,13 @@
|
|||||||
|
|
||||||
package nodes
|
package nodes
|
||||||
|
|
||||||
// UAM
|
func (this *HTTPRequest) isUAMRequest() bool {
|
||||||
func (this *HTTPRequest) doUAM() (block bool) {
|
// stub
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// UAM
|
||||||
|
func (this *HTTPRequest) doUAM() (block bool) {
|
||||||
|
// stub
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user