return
}
+ redirectTo := ctx.Query("redirect_to")
+ if len(redirectTo) > 0 {
+ ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubUrl)
+ } else {
+ redirectTo, _ = url.QueryUnescape(ctx.GetCookie("redirect_to"))
+ }
+
if isSucceed {
- if redirectTo, _ := url.QueryUnescape(ctx.GetCookie("redirect_to")); len(redirectTo) > 0 {
+ if len(redirectTo) > 0 {
ctx.SetCookie("redirect_to", "", -1, setting.AppSubUrl)
ctx.Redirect(redirectTo)
} else {