| @@ -121,7 +121,7 @@ func checkAutoLogin(ctx *context.Context) bool { | |||||
| ctx.ServerError("AutoSignIn", err) | ctx.ServerError("AutoSignIn", err) | ||||
| return true | return true | ||||
| } | } | ||||
| log.Info("here1...") | |||||
| redirectTo := ctx.Query("redirect_to") | redirectTo := ctx.Query("redirect_to") | ||||
| if len(redirectTo) > 0 { | if len(redirectTo) > 0 { | ||||
| ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true) | ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true) | ||||
| @@ -130,7 +130,7 @@ func checkAutoLogin(ctx *context.Context) bool { | |||||
| } | } | ||||
| if isSucceed { | if isSucceed { | ||||
| log.Info("here2...") | |||||
| isCourse := ctx.QueryBool("course") | isCourse := ctx.QueryBool("course") | ||||
| if redirectTo == "" && isCourse { | if redirectTo == "" && isCourse { | ||||
| @@ -138,8 +138,8 @@ func checkAutoLogin(ctx *context.Context) bool { | |||||
| redirectToCourse := setting.AppSubURL + "/" + setting.Course.OrgName | redirectToCourse := setting.AppSubURL + "/" + setting.Course.OrgName | ||||
| ctx.RedirectToFirst(redirectToCourse) | ctx.RedirectToFirst(redirectToCourse) | ||||
| } else { | } else { | ||||
| log.Info("here3...") | |||||
| ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL)) | ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL)) | ||||
| } | } | ||||
| return true | return true | ||||
| } | } | ||||