diff options
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index cd231ccd62..605071d110 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -374,7 +374,13 @@ func Action(ctx *middleware.Context) { }) return } - ctx.Redirect(ctx.Repo.RepoLink) + + redirectTo := ctx.Query("redirect_to") + if len(redirectTo) == 0 { + redirectTo = ctx.Repo.RepoLink + } + ctx.Redirect(redirectTo) + return ctx.JSON(200, map[string]interface{}{ "ok": true, |