diff --git a/src/nationalarchives/lib/cookies.mjs b/src/nationalarchives/lib/cookies.mjs index a7d16b17..cad4d64a 100644 --- a/src/nationalarchives/lib/cookies.mjs +++ b/src/nationalarchives/lib/cookies.mjs @@ -195,7 +195,7 @@ export default class Cookies { } const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${ domain ? ` domain=${domain}; ` : "" - } samesite=${sameSite}; path=${path};${maxAge !== null ? ` max-age=${maxAge}` : ""}${ + } samesite=${sameSite}; path=${path}${maxAge !== null ? `; max-age=${maxAge}` : ""}${ secure ? "; secure" : "" }`; document.cookie = cookie;