1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +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:
Gerasimos (Makis) Maropoulos
2018-06-25 20:21:52 +03:00
parent d216b91074
commit 2acb6e9385
8 changed files with 24 additions and 12 deletions

View File

@@ -27,6 +27,13 @@ func main() {
// of the same host, then enable it.
// Defaults to false.
DisableSubdomainPersistence: true,
// AllowReclaim will allow to
// Destroy and Start a session in the same request handler.
// All it does is that it removes the cookie for both `Request` and `ResponseWriter` while `Destroy`
// or add a new cookie to `Request` while `Start`.
//
// Defaults to false.
AllowReclaim: true,
})
app.Get("/", func(ctx iris.Context) {