mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	修复源站设置专属域名导致其他源站不可用的Bug
This commit is contained in:
		@@ -92,6 +92,7 @@ func (this *ReverseProxyConfig) Init() error {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for _, origin := range this.BackupOrigins {
 | 
						for _, origin := range this.BackupOrigins {
 | 
				
			||||||
		if len(origin.Domains) == 0 {
 | 
							if len(origin.Domains) == 0 {
 | 
				
			||||||
			group, ok := this.schedulingGroupMap[""]
 | 
								group, ok := this.schedulingGroupMap[""]
 | 
				
			||||||
@@ -123,9 +124,10 @@ func (this *ReverseProxyConfig) Init() error {
 | 
				
			|||||||
	if hasDomainGroups {
 | 
						if hasDomainGroups {
 | 
				
			||||||
		defaultGroup, ok := this.schedulingGroupMap[""]
 | 
							defaultGroup, ok := this.schedulingGroupMap[""]
 | 
				
			||||||
		if ok {
 | 
							if ok {
 | 
				
			||||||
			delete(this.schedulingGroupMap, "")
 | 
								for domain, group := range this.schedulingGroupMap {
 | 
				
			||||||
 | 
									if domain == "" {
 | 
				
			||||||
			for _, group := range this.schedulingGroupMap {
 | 
										continue
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				for _, origin := range defaultGroup.PrimaryOrigins {
 | 
									for _, origin := range defaultGroup.PrimaryOrigins {
 | 
				
			||||||
					group.PrimaryOrigins = append(group.PrimaryOrigins, origin)
 | 
										group.PrimaryOrigins = append(group.PrimaryOrigins, origin)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user