summaryrefslogtreecommitdiffstats
path: root/modules/middleware/auth.go
diff options
context:
space:
mode:
authorMartin van Beurden <chadoe@gmail.com>2014-09-21 14:07:00 +0200
committerMartin van Beurden <chadoe@gmail.com>2014-09-21 14:25:22 +0200
commit976f1486e01548bfb420a7c809ede6fc273e4a26 (patch)
treecef9d08801579d72dfb5c42e8bf8019f23f9dff6 /modules/middleware/auth.go
parentcb0ea46d1e06ec64358807d4e0fc49d9ecece311 (diff)
downloadgitea-976f1486e01548bfb420a7c809ede6fc273e4a26.tar.gz
gitea-976f1486e01548bfb420a7c809ede6fc273e4a26.zip
Set cookiepath to AppSubUrl
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r--modules/middleware/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 8fae5d1ece..2bc05697a9 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -48,7 +48,7 @@ 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))
+ 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 {