diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-01-30 20:30:07 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-01-30 20:30:07 -0500 |
commit | d8394bb2e0703db2dc2a57fea843a526663bb279 (patch) | |
tree | ab19ab26ff011fbf7cc5bca3d8be7c2a23a47cb2 /modules/middleware | |
parent | ee6786216a608fca2de322c90c7256577f2a500a (diff) | |
download | gitea-d8394bb2e0703db2dc2a57fea843a526663bb279.tar.gz gitea-d8394bb2e0703db2dc2a57fea843a526663bb279.zip |
modules/midlleware: little auth code fix
Diffstat (limited to 'modules/middleware')
-rw-r--r-- | modules/middleware/auth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index 94bb1c14a4..01e2ab5340 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -54,7 +54,8 @@ func Toggle(options *ToggleOptions) macaron.Handler { if strings.HasSuffix(ctx.Req.RequestURI, "watch") { return } - ctx.SetCookie("redirect_to", "/"+url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl) + println(url.QueryEscape(setting.AppSubUrl + ctx.Req.RequestURI)) + ctx.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl) ctx.Redirect(setting.AppSubUrl + "/user/login") return } else if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { |