Cleaning code for index.js

This commit is contained in:
Adolfo Reyna
2025-02-20 23:27:13 -05:00
parent e4dfee39ff
commit 0b20f05124
10 changed files with 364 additions and 414 deletions

8
config/cookiesOptions.js Normal file
View File

@@ -0,0 +1,8 @@
const cookiesOptions = {
maxAge: 1000 * 60 * 60 * 24 * 90, // would expire after 30 days
httpOnly: true, // The cookie only accessible by the web server
sameSite: 'none', // This and secure are required for properly
secure: true, // manage cockies in cros-domain
};
module.exports = { cookiesOptions };

12
config/corsOptions.js Normal file
View File

@@ -0,0 +1,12 @@
var corsOptions = {
origin: [
'http://localhost:8080',
'http://localhost:3000',
"https://social.emmint.com",
"https://fellowship.emmint.com",
"https://aeropi.local",
],
credentials: true
};
module.exports = { corsOptions };