mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
🐛 Fixed cookies when running Ghost without SSL (#15022)
As part of the updates to auth cookies we switched to SameSite=None which requires an SSL connection. Local development, and some production sites do not use SSL and so the cookie is invalid and a session is unable to be created with the browser.
This commit is contained in:
parent
815fdc9235
commit
86905aaad8
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ function getExpressSessionMiddleware() {
|
|||
maxAge: constants.SIX_MONTH_MS,
|
||||
httpOnly: true,
|
||||
path: urlUtils.getSubdir() + '/ghost',
|
||||
sameSite: 'none',
|
||||
sameSite: urlUtils.isSSL(config.get('url')) ? 'none' : 'lax',
|
||||
secure: urlUtils.isSSL(config.get('url'))
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue