setAccessCookies = function setAccessCookies(member, req, res, freeTier) {
    if (!member) {
        // If there is no cookie sent with the request, return early
        if (!req.headers.cookie || !req.headers.cookie.includes('ghost-access')) {
            return;
        }
        // If there are cookies sent with the request, set them to null and expire them immediately
        const accessCookie = `ghost-access=null; Max-Age=0; Path=/; HttpOnly; SameSite=Strict;`;
        const hmacCookie = `ghost-access-hmac=null; Max-Age=0; Path=/; HttpOnly; SameSite=Strict;`;
        const existingCookies = res.getHeader('Set-Cookie') || [];
        const cookiesToSet = [accessCookie, hmacCookie].concat(existingCookies);

        res.setHeader('Set-Cookie', cookiesToSet);
        return;
    }
    const hmacSecret = config.get('cacheMembersContent:hmacSecret');
    if (!hmacSecret) {
        return;
    }
    const hmacSecretBuffer = Buffer.from(hmacSecret, 'base64');
    if (hmacSecretBuffer.length === 0) {
        return;
    }
    const activeSubscription = member.subscriptions?.find(sub => sub.status === 'active');

    const cookieTimestamp = Math.floor(Date.now() / 1000); // to mitigate a cookie replay attack
    const memberTier = activeSubscription && activeSubscription.tier.id || freeTier.id;
    const memberTierAndTimestamp = `${memberTier}:${cookieTimestamp}`;
    const memberTierHmac = crypto.createHmac('sha256', hmacSecretBuffer).update(memberTierAndTimestamp).digest('hex');

    const maxAge = 3600;
    const accessCookie = `ghost-access=${memberTierAndTimestamp}; Max-Age=${maxAge}; Path=/; HttpOnly; SameSite=Strict;`;
    const hmacCookie = `ghost-access-hmac=${memberTierHmac}; Max-Age=${maxAge}; Path=/; HttpOnly; SameSite=Strict;`;

    const existingCookies = res.getHeader('Set-Cookie') || [];
    const cookiesToSet = [accessCookie, hmacCookie].concat(existingCookies);
    res.setHeader('Set-Cookie', cookiesToSet);
}
Sets the ghost-access and ghost-access-hmac cookies on the response object
@param {Object} member - The member object
@param {import('express').Request} req - The member object
@param {import('express').Response} res - The express response object to set the cookies on
@param {Object} freeTier - The free tier object
@returns