Ghost: Make this site private - not working in Chrome and Opera
Issue Summary
Change or delete the row 58: versions/5.54.4/core/frontend/apps/private-blogging/lib/middleware.js
return session({
name: 'ghost-private',
maxAge: constants.ONE_MONTH_MS,
signed: false,
sameSite: 'lax' <----- row 58: instead of 'none' or delete row
})(req, res, next);
Or you can delete the row 58 because sameSite: ‘Lax’ is the default value. You can’t code ‘secure’ within an object - secure: true will not work.
Works now in Chrome and Opera.
See https://web.dev/i18n/en/samesite-cookies-explained
Steps to Reproduce
See https://forum.ghost.org/t/make-this-site-private-not-working/39938/1
Ghost Version
5.54.4
Node.js Version
v18.15.0
How did you install Ghost?
local, macos
Database type
SQLite3
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct
- I agree to be friendly and polite to people in this repository
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (21 by maintainers)
Links to this issue
Commits related to this issue
- Fixed: Set cookie in privateBlogging - Update middleware.js "Make this site private" - not working in Chrome and Opera Closes #17514 — committed to joe-blocher/Ghost by joe-blocher 3 years ago
- Fixed private mode cookie for local development (#17938) fixes #17514 - good explanation in https://github.com/TryGhost/Ghost/pull/17938#discussion_r1328157348 - fixes setting the private mode co... — committed to TryGhost/Ghost by joe-blocher 3 years ago
My solution: I change always the code by myself, when I install an update. You have to change only 2 lines. The first time I reported the solution in August 2023. Maybe they will fix the bug sometimes …
Hey guys, any update on this one? I couldn’t access the links behind why the commit was reverted. So not sure on the details or complexity of the bug, is there any progress towards figuring it out? Thanks, and I’m a huge Ghost fan 😊
The pull request still not merged in version 5.82.2: Fixed private mode cookie for local development #17938
Why not?