We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce3fe05 commit bc78d6fCopy full SHA for bc78d6f
services/context/repo.go
@@ -328,6 +328,8 @@ func RedirectToRepo(ctx *Base, redirectRepoID int64) {
328
if ctx.Req.URL.RawQuery != "" {
329
redirectPath += "?" + ctx.Req.URL.RawQuery
330
}
331
+ // Git client needs a 301 redirect by default to follow the new location
332
+ // It's not documentated in git documentation, but it's the behavior of git client
333
ctx.Redirect(path.Join(setting.AppSubURL, redirectPath), http.StatusMovedPermanently)
334
335
0 commit comments