mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	自定义页面增加是否“启用系统自定义页面”选项
This commit is contained in:
		@@ -506,6 +506,8 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// pages
 | 
			
		||||
	this.web.EnableGlobalPages = web.EnableGlobalPages
 | 
			
		||||
 | 
			
		||||
	if len(web.Pages) > 0 {
 | 
			
		||||
		this.web.Pages = web.Pages
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ const defaultPageContentType = "text/html; charset=utf-8"
 | 
			
		||||
func (this *HTTPRequest) doPage(status int) (shouldStop bool) {
 | 
			
		||||
	if len(this.web.Pages) == 0 {
 | 
			
		||||
		// 集群自定义页面
 | 
			
		||||
		if this.nodeConfig != nil && this.ReqServer != nil {
 | 
			
		||||
		if this.nodeConfig != nil && this.ReqServer != nil && this.web.EnableGlobalPages {
 | 
			
		||||
			var httpPagesPolicy = this.nodeConfig.FindHTTPPagesPolicyWithClusterId(this.ReqServer.ClusterId)
 | 
			
		||||
			if httpPagesPolicy != nil && httpPagesPolicy.IsOn && len(httpPagesPolicy.Pages) > 0 {
 | 
			
		||||
				return this.doPageLookup(httpPagesPolicy.Pages, status)
 | 
			
		||||
@@ -34,7 +34,7 @@ func (this *HTTPRequest) doPage(status int) (shouldStop bool) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 集群自定义页面
 | 
			
		||||
	if this.nodeConfig != nil && this.ReqServer != nil {
 | 
			
		||||
	if this.nodeConfig != nil && this.ReqServer != nil && this.web.EnableGlobalPages {
 | 
			
		||||
		var httpPagesPolicy = this.nodeConfig.FindHTTPPagesPolicyWithClusterId(this.ReqServer.ClusterId)
 | 
			
		||||
		if httpPagesPolicy != nil && httpPagesPolicy.IsOn && len(httpPagesPolicy.Pages) > 0 {
 | 
			
		||||
			return this.doPageLookup(httpPagesPolicy.Pages, status)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user