mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Fixed _removeSessionCookie method use of cookies
refs https://github.com/TryGhost/Team/issues/908 The `cookies` module will unset a cookie if `null` or `undefined` is passed as the value, or if the value is not passed. The previous call was passing the options, which were being read as the value, and resulting in `'[Object object]'` being stored as a cookie. Explicitly passing `null` as the value makes this code correct and easier to maintain.
This commit is contained in:
parent
5fc0646d5e
commit
ae9bad957b
@ -108,7 +108,7 @@ class MembersSSR {
|
||||
*/
|
||||
_removeSessionCookie(req, res) {
|
||||
const cookies = this._getCookies(req, res);
|
||||
cookies.set(this.sessionCookieName, this.sessionCookieOptions);
|
||||
cookies.set(this.sessionCookieName, null, this.sessionCookieOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user