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

Merge set cookie value for same name multiple times #705

Closed
arily opened this issue Mar 14, 2024 · 2 comments · Fixed by #830
Closed

Merge set cookie value for same name multiple times #705

arily opened this issue Mar 14, 2024 · 2 comments · Fixed by #830
Labels
enhancement New feature or request

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.

@pi0 pi0 changed the title set cookie for same name multiple times Merge set cookie value for same name multiple times Jun 19, 2024
@pi0 pi0 added the enhancement New feature or request label Jun 19, 2024
@pi0 pi0 closed this as completed Jul 18, 2024
@pi0 pi0 reopened this Jul 18, 2024
@pi0 pi0 closed this as completed in #830 Jul 18, 2024
@pi0
Copy link
Member

pi0 commented Jul 18, 2024

Issues with merging cookies will be solved in upcoming h3 v2

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

Successfully merging a pull request may close this issue.

2 participants