We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7758df4 commit 7eb1d9dCopy full SHA for 7eb1d9d
services/context/repo.go
@@ -356,7 +356,9 @@ func RedirectToRepo(ctx *Base, redirectRepoID int64) {
356
if ctx.Req.URL.RawQuery != "" {
357
redirectPath += "?" + ctx.Req.URL.RawQuery
358
}
359
- ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusTemporaryRedirect)
+ // Git client needs a 301 redirect by default to follow the new location
360
+ // It's not documentated in git documentation, but it's the behavior of git client
361
+ ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusMovedPermanently)
362
363
364
func repoAssignment(ctx *Context, repo *repo_model.Repository) {
0 commit comments