1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-13 04:58:19 +00:00

Refactor and simplify redirect to url (#3674) (#3676)

This commit is contained in:
Lauris BH
2018-03-16 13:59:47 +02:00
committed by Lunny Xiao
parent 0c612124f9
commit c0e0fb7d39
5 changed files with 29 additions and 24 deletions

View File

@@ -271,9 +271,5 @@ func Action(ctx *context.Context) {
return
}
redirectTo := ctx.Query("redirect_to")
if len(redirectTo) == 0 {
redirectTo = u.HomeLink()
}
ctx.Redirect(redirectTo)
ctx.RedirectToFirst(ctx.Query("redirect_to"), u.HomeLink())
}