You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
409 B
19 lines
409 B
3 years ago
|
const { store } = require("./db/db");
|
||
|
|
||
|
const sessionOpts = {
|
||
|
secret: process.env.SERVER_SESSION_SECRET,
|
||
|
resave: false,
|
||
|
saveUninitialized: false,
|
||
|
cookie: {
|
||
|
secure: true,
|
||
|
sameSite: "none",
|
||
3 years ago
|
maxAge: Number(process.env.SESSION_LENGTH),
|
||
3 years ago
|
},
|
||
|
store: store,
|
||
|
};
|
||
|
|
||
|
const corsOpts = { credentials: true, origin: true, secure: true };
|
||
|
|
||
|
exports.sessionOpts = sessionOpts;
|
||
|
exports.corsOpts = corsOpts;
|