Skip to content

Commit

Permalink
feat: set cookie SameSite using env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyyzhang03 committed Nov 3, 2023
1 parent 01aec67 commit c0d2932
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ app.use(
name: "session",
keys: [process.env.COOKIE_SECRET],
// Cookie Options
maxAge: 48 * 60 * 60 * 1000 //Logged in for 48 hours
maxAge: 48 * 60 * 60 * 1000, //Logged in for 48 hours
sameSite: process.env.COOKIE_SAME_SITE
})
);
app.use(passport.initialize());
Expand All @@ -89,7 +90,7 @@ Services.log.info("Hacker router activated");
teamRouter.activate(apiRouter);
Services.log.info("Team router activated");
travelRouter.activate(apiRouter);
Services.log.info("Travel router activated")
Services.log.info("Travel router activated");
sponsorRouter.activate(apiRouter);
Services.log.info("Sponsor router activated");
volunteerRouter.activate(apiRouter);
Expand Down

0 comments on commit c0d2932

Please sign in to comment.