0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

🐛 Fixed session auth for blogs running on sub dir (#9986)

closes #9982

This adds the subdirectory to the path for the session cookie, enabling
cookies to be sent/set/parsed for the session authentication to work.
This commit is contained in:
Fabien O'Carroll 2018-10-11 14:11:24 +07:00 committed by GitHub
parent f8d244f060
commit 71160da3b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ const getSession = (req, res, next) => {
cookie: {
maxAge: constants.SIX_MONTH_MS,
httpOnly: true,
path: '/ghost',
path: urlService.utils.getSubdir() + '/ghost',
sameSite: 'lax',
secure: urlService.utils.isSSL(config.get('url'))
}