From ef230806660fe1c6fa97eb9e9639a32784d334da Mon Sep 17 00:00:00 2001 From: MaciejkaG Date: Sun, 10 Mar 2024 16:13:27 +0100 Subject: [PATCH] Added an option for secure cookies --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 687a24f..8bffdc4 100644 --- a/index.js +++ b/index.js @@ -37,6 +37,7 @@ const sessionMiddleware = session({ secret: uuidv4(), resave: true, saveUninitialized: true, + cookie: { secure: process.env.cookie_secure === "true" ? true : false } }); app.use(sessionMiddleware);