diff --git a/back-end/src/controllers/api/users.js b/back-end/src/controllers/api/users.js index 9ece433..9c821d7 100644 --- a/back-end/src/controllers/api/users.js +++ b/back-end/src/controllers/api/users.js @@ -113,9 +113,7 @@ module.exports = { user: 'projectblogman@gmail.com', // generated ethereal user pass: 'girlscript2020', //account.pass }, - tls: { - rejectUnauthorized: false, - }, + // Removed the tls configuration to use default secure settings }); // setup email data with unicode symbols diff --git a/back-end/src/middlewares/init.js b/back-end/src/middlewares/init.js index 60d824e..d65ac19 100644 --- a/back-end/src/middlewares/init.js +++ b/back-end/src/middlewares/init.js @@ -15,6 +15,11 @@ module.exports = [ cookieSession({ name: 'session', keys: ['123'], + domain: 'example.com', // Set to your domain + expires: new Date(Date.now() + 60 * 60 * 1000), // 1 hour expiration + httpOnly: true, + path: '/', + secure: true, // Ensure cookies are sent over HTTPS }), cookieParser(), ];