From 721f00d83c0bd49257126f35715be8ea5399d36e Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Mon, 26 Jul 2021 23:51:41 +0200 Subject: [PATCH] bugfix --- app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index e44c88c..4890686 100644 --- a/app.js +++ b/app.js @@ -29,7 +29,7 @@ const sequelize = (() => { const storeDB = (() => { if (isProduction) { - new Sequelize(process.env.DB_STORE_NAME, process.env.DB_USER, process.env.DB_PASS, { + return new Sequelize(process.env.DB_STORE_NAME, process.env.DB_USER, process.env.DB_PASS, { host: process.env.DB_PATH, dialect: process.env.DB_DATA_DIALECT, }); @@ -184,10 +184,15 @@ function getCookieExpiry() { } const app = express(); +app.set('trust proxy', 1) app.use(session({ secret: process.env.SERVER_SESSION_SECRET, resave: false, saveUninitialized: false, + cookie: { + secure: true, + sameSite: "none", + } })) app.use(cors({ credentials: true, origin: true, secure: true })); app.use(express.json())