From a418c98c4311cf9bfa4e249082e39f860e2fbe9c Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 24 Oct 2016 09:52:02 -0700 Subject: debugging cookie --- system/admin/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system/admin') diff --git a/system/admin/handlers.go b/system/admin/handlers.go index e3950e5..5d7ac97 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -100,6 +100,7 @@ func initHandler(res http.ResponseWriter, req *http.Request) { Name: "_token", Value: token, Expires: week, + Path: "/", }) redir := strings.TrimSuffix(req.URL.String(), "/init") @@ -336,6 +337,7 @@ func configUsersEditHandler(res http.ResponseWriter, req *http.Request) { Name: "_token", Value: token, Expires: week, + Path: "/", } http.SetCookie(res, cookie) @@ -497,6 +499,7 @@ func loginHandler(res http.ResponseWriter, req *http.Request) { Name: "_token", Value: token, Expires: week, + Path: "/", }) http.Redirect(res, req, strings.TrimSuffix(req.URL.String(), "/login"), http.StatusFound) @@ -508,6 +511,7 @@ func logoutHandler(res http.ResponseWriter, req *http.Request) { Name: "_token", Expires: time.Unix(0, 0), Value: "", + Path: "/", }) http.Redirect(res, req, req.URL.Scheme+req.URL.Host+"/admin/login", http.StatusFound) -- cgit v1.2.3