From bb8c898f97ac5f2a600f8eadda2ae24e2f36001b Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Mon, 20 Oct 2014 22:43:23 -0700 Subject: [PATCH] Fix clearing of session cookie after 9a43bfc5bbdf58b8f67e4e30d0ec5dcec1bd0014. --- app/githop.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/githop.go b/app/githop.go index 273863b..6bdc663 100644 --- a/app/githop.go +++ b/app/githop.go @@ -191,7 +191,9 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { account, err := getAccount(c, userId) if account == nil { // Can't look up the account, session cookie must be invalid, clear it. - indexUrl, _ := router.Get("sign-out").URL() + session.Options.MaxAge = -1 + session.Save(r, w) + indexUrl, _ := router.Get("index").URL() http.Redirect(w, r, indexUrl.String(), http.StatusFound) return }