1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-05 01:00:55 +00:00

session cookie support IE

This commit is contained in:
astaxie 2015-04-02 14:02:39 +08:00
parent d02e32fa51
commit e675594e46

View File

@ -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)