Nuxt 3 server routes do not set cookies

Hi,

When deployed to netlify, the server api routes of a nuxt 3 project won’t set cookies.
I have checked the response headers and there is no ‘Set-Cookie’ header present on the response.

I have created a repro: GitHub - kai-oswald/netlify-cookies

And demo: https://kaleidoscopic-dolphin-52510b.netlify.app/

Note the /api/cookie call that gets called when the app is mounted doesn’t set the cookie.

Thanks,
Kai

This is a problem with Nuxt’s netlify adapter. As soon as I changed this to netlify-edge, it works. Please report this issue to Nuxt. Try here: https://fanciful-bienenstitch-665b81.netlify.app/api/cookie, repo here: https://github.com/Hrishikesh-K/nuxt-test

FYI, for those with the same issue. There is a support ticket here: Server-routes do not set cookies on netlify · Issue #8705 · nuxt/framework · GitHub

Due to this line: nitro/netlify.ts at main · unjs/nitro · GitHub