summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 20ea1e24a2..236d66bd1f 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -307,11 +307,7 @@ func Action(ctx *context.Context) {
return
}
- redirectTo := ctx.Query("redirect_to")
- if len(redirectTo) == 0 {
- redirectTo = ctx.Repo.RepoLink
- }
- ctx.Redirect(redirectTo)
+ ctx.RedirectToFirst(ctx.Query("redirect_to"), ctx.Repo.RepoLink)
}
// Download download an archive of a repository