Skip to content

Commit

Permalink
Update cookie settings in backend/index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoCoding committed Apr 10, 2024
1 parent c07ace9 commit 1021f65
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ app.use(
saveUninitialized: false,
cookie: {
httpOnly: true,
secure: process.env.NODE_ENV === "production", // Only send cookie over HTTPS.
domain:
process.env.NODE_ENV === "development"
? "localhost"
: "DojoDraw.netlify.app",
sameSite: process.env.NODE_ENV === "development" ? "lax" : "none", // Use 'none' for cross-site delivery
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "development" ? "lax" : "none",
// maxAge: 24 * 60 * 60 * 1000, // 24 hours
},
})
Expand Down

0 comments on commit 1021f65

Please sign in to comment.