mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Added flag for disabling sign cookies
no-issue
This commit is contained in:
parent
ebbf4e69f9
commit
2a90d84e9a
1 changed files with 7 additions and 1 deletions
|
@ -31,6 +31,7 @@ class MembersSSR {
|
|||
* @prop {string} [cookieName] - The name of the members-ssr cookie
|
||||
* @prop {number} [cookieMaxAge] - The max age in ms of the members-ssr cookie
|
||||
* @prop {string} [cookiePath] - The Path flag for the cookie
|
||||
* @prop {boolean} [dangerousRemovalOfSignedCookie] - Flag for removing signed cookie
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -45,7 +46,8 @@ class MembersSSR {
|
|||
cookieMaxAge = SIX_MONTHS_MS,
|
||||
cookiePath = '/',
|
||||
cookieKeys,
|
||||
getMembersApi
|
||||
getMembersApi,
|
||||
dangerousRemovalOfSignedCookie
|
||||
} = options;
|
||||
|
||||
if (!getMembersApi) {
|
||||
|
@ -71,6 +73,10 @@ class MembersSSR {
|
|||
path: cookiePath
|
||||
};
|
||||
|
||||
if (dangerousRemovalOfSignedCookie === true) {
|
||||
this.sessionCookieOptions.signed = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type CookiesOptions
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue