Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting domain on 'cookie' #160

Open
scottishsmile opened this issue Apr 25, 2024 · 0 comments
Open

Setting domain on 'cookie' #160

scottishsmile opened this issue Apr 25, 2024 · 0 comments

Comments

@scottishsmile
Copy link

scottishsmile commented Apr 25, 2024

Hi,

I am finding that the cookie created for example.com by default is not accepted if you enter www.example.com into the browser. Chrome/ Edge seems to be blocking it.

I have tried entering domain: 'www.example.com' but it is not having an effect?

res.setHeader('Set-Cookie', [
cookie.serialize(
    `${COOKIE_NAME}`, accessJson, {
        httpOnly: true,
        domain: COOKIE_DOMAIN,
        secure: true,
        maxAge: COOKIE_MAX_AGE,
        sameSite: 'lax',
        path: '/'
    }
)]);

Anyone else having this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants