mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	网站全局设置增加“强制Ln请求“选项
This commit is contained in:
		@@ -66,19 +66,21 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// 二级节点
 | 
						// 二级节点
 | 
				
			||||||
	var hasMultipleLnNodes = false
 | 
						var hasMultipleLnNodes = false
 | 
				
			||||||
	if this.cacheRef != nil {
 | 
						if this.cacheRef != nil || (this.nodeConfig != nil && this.nodeConfig.GlobalServerConfig != nil && this.nodeConfig.GlobalServerConfig.HTTPAll.ForceLnRequest) {
 | 
				
			||||||
		origin, lnNodeId, hasMultipleLnNodes = this.getLnOrigin(failedLnNodeIds)
 | 
							origin, lnNodeId, hasMultipleLnNodes = this.getLnOrigin(failedLnNodeIds)
 | 
				
			||||||
		if origin != nil {
 | 
							if origin != nil {
 | 
				
			||||||
			// 强制变更原来访问的域名
 | 
								// 强制变更原来访问的域名
 | 
				
			||||||
			requestHost = this.ReqHost
 | 
								requestHost = this.ReqHost
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// 回源Header中去除If-None-Match和If-Modified-Since
 | 
							if this.cacheRef != nil {
 | 
				
			||||||
		if !this.cacheRef.EnableIfNoneMatch {
 | 
								// 回源Header中去除If-None-Match和If-Modified-Since
 | 
				
			||||||
			this.DeleteHeader("If-None-Match")
 | 
								if !this.cacheRef.EnableIfNoneMatch {
 | 
				
			||||||
		}
 | 
									this.DeleteHeader("If-None-Match")
 | 
				
			||||||
		if !this.cacheRef.EnableIfModifiedSince {
 | 
								}
 | 
				
			||||||
			this.DeleteHeader("If-Modified-Since")
 | 
								if !this.cacheRef.EnableIfModifiedSince {
 | 
				
			||||||
 | 
									this.DeleteHeader("If-Modified-Since")
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user