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

set cookie for same name multiple times #705

Open
arily opened this issue Mar 14, 2024 · 1 comment
Open

set cookie for same name multiple times #705

arily opened this issue Mar 14, 2024 · 1 comment

Comments

@arily
Copy link

arily commented Mar 14, 2024

Environment

Nuxt 3.10.3 with Nitro 2.9.1
Node 20.10.0

Reproduction

setCookie(e, 'session', '123', { httpOnly: true })
// ...
setCookie(e, 'session', '123', { httpOnly: true, maxAge: /* 1m */ 60 * 60 * 24 * 30 })

Describe the bug

will actually set cookie twice:

set-cookie: session=123; Path=/; HttpOnly
set-cookie: session=123; Max-Age=2592000; Path=/; HttpOnly

Additional context

No response

Logs

No response

@arily
Copy link
Author

arily commented Mar 14, 2024

send only the last value, or merge the session options would be more reasonable.

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

No branches or pull requests

1 participant