Added an option for secure cookies

This commit is contained in:
MaciejkaG 2024-03-10 16:13:27 +01:00
parent 0c4448404c
commit ef23080666

View File

@ -37,6 +37,7 @@ const sessionMiddleware = session({
secret: uuidv4(), secret: uuidv4(),
resave: true, resave: true,
saveUninitialized: true, saveUninitialized: true,
cookie: { secure: process.env.cookie_secure === "true" ? true : false }
}); });
app.use(sessionMiddleware); app.use(sessionMiddleware);