mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	如果管理系统前端有反向代理,则不要自动从HTTP跳转到HTTPS
This commit is contained in:
		@@ -50,10 +50,13 @@ func (this *IndexAction) RunGet(params struct {
 | 
			
		||||
				newHost += ":" + types.String(httpsPort)
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// 如果没有前端反向代理,则跳转
 | 
			
		||||
			if len(this.Request.Header.Get("X-Forwarded-For")) == 0 && len(this.Request.Header.Get("X-Real-Ip")) == 0 {
 | 
			
		||||
				this.RedirectURL("https://" + newHost + this.Request.RequestURI)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// DEMO模式
 | 
			
		||||
	this.Data["isDemo"] = teaconst.IsDemoMode
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user