We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f68d49c commit 50f8563Copy full SHA for 50f8563
services/context/repo.go
@@ -361,7 +361,9 @@ func RedirectToRepo(ctx *Base, redirectRepoID int64) {
361
if ctx.Req.URL.RawQuery != "" {
362
redirectPath += "?" + ctx.Req.URL.RawQuery
363
}
364
- ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusTemporaryRedirect)
+ // Git client needs a 301 redirect by default to follow the new location
365
+ // It's not documentated in git documentation, but it's the behavior of git client
366
+ ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusMovedPermanently)
367
368
369
func repoAssignment(ctx *Context, repo *repo_model.Repository) {
0 commit comments