h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Merge set cookie value for same name multiple times

Open arily opened this issue 1 year ago • 1 comments

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 avatar Mar 14 '24 01:03 arily

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

arily avatar Mar 14 '24 01:03 arily

Issues with merging cookies will be solved in upcoming h3 v2

pi0 avatar Jul 18 '24 22:07 pi0