From e675594e465189ead90bdc57308fea9cd1c960f5 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 2 Apr 2015 14:02:39 +0800 Subject: [PATCH] session cookie support IE --- session/session.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/session/session.go b/session/session.go index 3cbd2b05..01aae1a5 100644 --- a/session/session.go +++ b/session/session.go @@ -151,6 +151,7 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se Domain: manager.config.Domain} if manager.config.CookieLifeTime >= 0 { cookie.MaxAge = manager.config.CookieLifeTime + cookie.Expires = time.Now().Add(time.Duration(manager.config.CookieLifeTime) * time.Second) } if manager.config.EnableSetCookie { http.SetCookie(w, cookie) @@ -177,6 +178,7 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se Domain: manager.config.Domain} if manager.config.CookieLifeTime >= 0 { cookie.MaxAge = manager.config.CookieLifeTime + cookie.Expires = time.Now().Add(time.Duration(manager.config.CookieLifeTime) * time.Second) } if manager.config.EnableSetCookie { http.SetCookie(w, cookie)