Skip to content

Commit a5194f1

Browse files
committed
issue resolved
1 parent 599239e commit a5194f1

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

backend/.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ CLOUDINARY_API_KEY=your_api_key
1313
CLOUDINARY_API_SECRET=your_api_secret
1414

1515
EMAIL_USER=youremail@gmail.com
16-
EMAIL_PASS=yourapppassword
16+
EMAIL_PASS=yourapppassword
17+
18+
NODE_ENV=development # "development" for local or "production" for deployment

backend/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ app.use(
3030
secret: "keyboard cat",
3131
resave: false,
3232
saveUninitialized: false,
33+
cookie: {
34+
secure: process.env.NODE_ENV === "production", // HTTPS only in prod
35+
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax", // cross-origin in prod
36+
},
3337
}),
3438
);
3539

0 commit comments

Comments
 (0)