Skip to content

Commit

Permalink
Registration - Fix cookies for development
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Dec 23, 2024
1 parent 062b144 commit 931ee5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/regSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import clearOldCookies from '@/server/clearOldCookies';

export const cookieName = config.get('session_cookie_key');

const isProduction = process.env.NODE_ENV === 'production'
const regSessionOpts = {
cookieName,
password: config.get('server_session_secret'),
cookieOptions: {
sameSite: 'none',
secure: process.env.NODE_ENV === 'production',
sameSite: isProduction ? 'none' : 'strict',
secure: isProduction,
maxAge: 1000 * 3600 * 24 * 60,
},
};
Expand Down

0 comments on commit 931ee5b

Please sign in to comment.