mirror of
https://github.com/samsonjs/retrogit.git
synced 2026-03-26 09:35:50 +00:00
Fix clearing of session cookie after 9a43bfc5bb.
This commit is contained in:
parent
4e2076a98d
commit
bb8c898f97
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue