mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	路由规则可以单独设置UAM(仅企业版可用)
This commit is contained in:
		@@ -265,12 +265,21 @@ func (this *HTTPRequest) doBegin() {
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// UAM
 | 
			
		||||
		if !isHealthCheck && this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn {
 | 
			
		||||
		if !isHealthCheck {
 | 
			
		||||
			if this.web.UAM != nil {
 | 
			
		||||
				if this.web.UAM.IsOn {
 | 
			
		||||
					if this.doUAM() {
 | 
			
		||||
						this.doEnd()
 | 
			
		||||
						return
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			} else if this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn {
 | 
			
		||||
				if this.doUAM() {
 | 
			
		||||
					this.doEnd()
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// 跳转
 | 
			
		||||
		if len(this.web.HostRedirects) > 0 {
 | 
			
		||||
@@ -521,6 +530,11 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// UAM
 | 
			
		||||
	if web.UAM != nil && (web.UAM.IsPrior || isTop) {
 | 
			
		||||
		this.web.UAM = web.UAM
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 重写规则
 | 
			
		||||
	if len(web.RewriteRefs) > 0 {
 | 
			
		||||
		for index, ref := range web.RewriteRefs {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user