mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	fix not respecting landing page setting (#4209)
* fix not respecting landing page setting * fmt * add landing page test
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							6efdcaed86
						
					
				
				
					commit
					adba2ad609
				
			@@ -37,12 +37,6 @@ func Toggle(options *ToggleOptions) macaron.Handler {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Check non-logged users landing page.
 | 
			
		||||
		if !ctx.IsSigned && ctx.Req.RequestURI == "/" && setting.LandingPageURL != setting.LandingPageHome {
 | 
			
		||||
			ctx.Redirect(setting.AppSubURL + string(setting.LandingPageURL))
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Redirect to dashboard if user tries to visit any non-login page.
 | 
			
		||||
		if options.SignOutRequired && ctx.IsSigned && ctx.Req.RequestURI != "/" {
 | 
			
		||||
			ctx.Redirect(setting.AppSubURL + "/")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user