forked from forgejo/forgejo
Refactor and simplify redirect to url (#3674)
This commit is contained in:
parent
a2a49c93c7
commit
7b2b900e13
5 changed files with 29 additions and 24 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue