mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 03:41:28 +00:00
session cookie support IE
This commit is contained in:
parent
d02e32fa51
commit
e675594e46
@ -151,6 +151,7 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
|
|||||||
Domain: manager.config.Domain}
|
Domain: manager.config.Domain}
|
||||||
if manager.config.CookieLifeTime >= 0 {
|
if manager.config.CookieLifeTime >= 0 {
|
||||||
cookie.MaxAge = manager.config.CookieLifeTime
|
cookie.MaxAge = manager.config.CookieLifeTime
|
||||||
|
cookie.Expires = time.Now().Add(time.Duration(manager.config.CookieLifeTime) * time.Second)
|
||||||
}
|
}
|
||||||
if manager.config.EnableSetCookie {
|
if manager.config.EnableSetCookie {
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
@ -177,6 +178,7 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
|
|||||||
Domain: manager.config.Domain}
|
Domain: manager.config.Domain}
|
||||||
if manager.config.CookieLifeTime >= 0 {
|
if manager.config.CookieLifeTime >= 0 {
|
||||||
cookie.MaxAge = manager.config.CookieLifeTime
|
cookie.MaxAge = manager.config.CookieLifeTime
|
||||||
|
cookie.Expires = time.Now().Add(time.Duration(manager.config.CookieLifeTime) * time.Second)
|
||||||
}
|
}
|
||||||
if manager.config.EnableSetCookie {
|
if manager.config.EnableSetCookie {
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
|
Loading…
Reference in New Issue
Block a user