mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 23:54:25 +01:00 
			
		
		
		
	Backport #34005 by lunny Fix #28460 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		
							parent
							
								
									7758df4264
								
							
						
					
					
						commit
						4b3400bd9c
					
				@ -356,7 +356,9 @@ func RedirectToRepo(ctx *Base, redirectRepoID int64) {
 | 
			
		||||
	if ctx.Req.URL.RawQuery != "" {
 | 
			
		||||
		redirectPath += "?" + ctx.Req.URL.RawQuery
 | 
			
		||||
	}
 | 
			
		||||
	ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusTemporaryRedirect)
 | 
			
		||||
	// Git client needs a 301 redirect by default to follow the new location
 | 
			
		||||
	// It's not documentated in git documentation, but it's the behavior of git client
 | 
			
		||||
	ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusMovedPermanently)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func repoAssignment(ctx *Context, repo *repo_model.Repository) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user