Verify canary release
Provide environment information
Not applicable, see reproduction here: https://codesandbox.io/s/condescending-torvalds-e3il3k?file=/package.json
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Calling "cookies.set" twice on an API route with edge handler runtime will set only one cookie.
Expected Behavior
You'll see one "Set-Cookie" with 2 values, however it should be instead 2 "Set-Cookie" with only one value.
Set-Cookie can be repeated as many time as needed in an HTTP response to set multiple cookies. Edge middlewares do not suffer from this issue, it affects only API routes.
Link to reproduction
https://codesandbox.io/s/condescending-torvalds-e3il3k
To Reproduce
https://codesandbox.io/s/condescending-torvalds-e3il3k?file=/pages/index.tsx
Open index, check the Network tab for the "cookie" request.
NEXT-471
Verify canary release
Provide environment information
Not applicable, see reproduction here: https://codesandbox.io/s/condescending-torvalds-e3il3k?file=/package.json
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Calling "cookies.set" twice on an API route with edge handler runtime will set only one cookie.
Expected Behavior
You'll see one "Set-Cookie" with 2 values, however it should be instead 2 "Set-Cookie" with only one value.
Set-Cookie can be repeated as many time as needed in an HTTP response to set multiple cookies. Edge middlewares do not suffer from this issue, it affects only API routes.
Link to reproduction
https://codesandbox.io/s/condescending-torvalds-e3il3k
To Reproduce
https://codesandbox.io/s/condescending-torvalds-e3il3k?file=/pages/index.tsx
Open index, check the Network tab for the "cookie" request.
NEXT-471