1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-02 20:45:47 +03:00
parent 872dd45359
commit c5139b22ee
2 changed files with 14 additions and 1 deletions

View File

@@ -38,7 +38,11 @@ func logout(ctx iris.Context) {
func main() {
app := iris.New()
sess := sessions.New(sessions.Config{Cookie: cookieNameForSessionID, AllowReclaim: true})
sess := sessions.New(sessions.Config{
Cookie: cookieNameForSessionID,
// CookieSecureTLS: true,
AllowReclaim: true,
})
app.Use(sess.Handler())
// ^ or comment this line and use sess.Start(ctx) inside your handlers
// instead of sessions.Get(ctx).