mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: dev env
This commit is contained in:
parent
c3380179ce
commit
73ebd6ad49
1 changed files with 5 additions and 1 deletions
|
|
@ -16,7 +16,11 @@ module.exports = session({
|
|||
cookie: {
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
secure: config.nodeEnv === 'production',
|
||||
// Never mark the cookie Secure in dev-bypass mode: it's meant to be tested
|
||||
// over plain http://localhost, and browsers silently drop Secure cookies
|
||||
// on non-HTTPS origins, which would otherwise cause an endless redirect
|
||||
// back to /auth/login after a seemingly successful dev login.
|
||||
secure: config.nodeEnv === 'production' && !config.devBypassAuth,
|
||||
maxAge: 1000 * 60 * 60 * 24 * 30,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue