h3
h3 copied to clipboard
Merge set cookie value for same name multiple times
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
send only the last value, or merge the session options would be more reasonable.
Issues with merging cookies will be solved in upcoming h3 v2