mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Refactor and simplify redirect to url (#3674)
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
a2a49c93c7
commit
7b2b900e13
@@ -50,12 +50,8 @@ func SignInOpenID(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if isSucceed {
|
||||
if len(redirectTo) > 0 {
|
||||
ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL)
|
||||
ctx.Redirect(redirectTo)
|
||||
} else {
|
||||
ctx.Redirect(setting.AppSubURL + "/")
|
||||
}
|
||||
ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL)
|
||||
ctx.RedirectToFirst(redirectTo)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user