I set up a Fastify middleware like to create a cookie. The cookie is created correctly for Fastify routes (/api/todos), but the cookies don't make it to the HTTP response of Astro pages.
I've tried adding a console.log to the middleware and it gets printed for both pages, so it seems like reply.setCookie is executed in both cases. Why is the cookie missing from Astro routes HTTP response (I've checked via Chrome Developer Tools)? It seems like a bug? Is there a workaround?
I set up a Fastify middleware like to create a cookie. The cookie is created correctly for Fastify routes (
/api/todos
), but the cookies don't make it to the HTTP response of Astro pages.My
index.ts
:I've tried adding a
console.log
to the middleware and it gets printed for both pages, so it seems like reply.setCookie is executed in both cases. Why is the cookie missing from Astro routes HTTP response (I've checked via Chrome Developer Tools)? It seems like a bug? Is there a workaround?Thanks!