mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
session examples: add the 'AllowReclaim: true' session.Config field to true, help users like https://github.com/kataras/iris/issues/1031\#issuecomment-399894693
Former-commit-id: 2ab7e56a4fda380fb52a8912a328797ba332f2c8
This commit is contained in:
@@ -32,8 +32,10 @@ func main() {
|
||||
defer db.Close() // close the database connection if application errored.
|
||||
|
||||
sess := sessions.New(sessions.Config{
|
||||
Cookie: "sessionscookieid",
|
||||
Expires: 45 * time.Minute}, // <=0 means unlimited life. Defaults to 0.
|
||||
Cookie: "sessionscookieid",
|
||||
Expires: 45 * time.Minute, // <=0 means unlimited life. Defaults to 0.
|
||||
AllowReclaim: true,
|
||||
},
|
||||
)
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user