mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:10:54 +00:00
session cookie support IE
This commit is contained in:
parent
55b1d6a897
commit
1148359570
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user