mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 04:21:57 +00:00
Former-commit-id: 03173f54c8b7b2ad389487435c1daf9e4f741639
This commit is contained in:
@@ -140,10 +140,6 @@ func (s *sessions) Start(res http.ResponseWriter, req *http.Request) iris.Sessio
|
|||||||
cookie.Expires = time.Now().Add(s.config.Expires)
|
cookie.Expires = time.Now().Add(s.config.Expires)
|
||||||
}
|
}
|
||||||
cookie.MaxAge = int(cookie.Expires.Sub(time.Now()).Seconds())
|
cookie.MaxAge = int(cookie.Expires.Sub(time.Now()).Seconds())
|
||||||
} else {
|
|
||||||
// if it's -1 then the cookie is deleted when the browser closes
|
|
||||||
// so MaxAge = -1
|
|
||||||
cookie.MaxAge = -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddCookie(cookie, res)
|
AddCookie(cookie, res)
|
||||||
|
|||||||
Reference in New Issue
Block a user