diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-24 09:52:02 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-24 09:52:02 -0700 |
commit | a418c98c4311cf9bfa4e249082e39f860e2fbe9c (patch) | |
tree | cf34f373e7b5912e79da4e626bca007b34f19c50 | |
parent | f0c3efab51b4ee9cc3b1b51db862ae918cb091da (diff) |
debugging cookie
-rw-r--r-- | system/admin/handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |