0
Fork 0
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:
Fabien O'Carroll 2019-10-11 18:00:19 +07:00
parent ebbf4e69f9
commit 2a90d84e9a

View file

@ -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
*/