Skip to content

Commit

Permalink
fix(vercel): make Astro.cookies work again (#9809)
Browse files Browse the repository at this point in the history
* addCookieHeaders

* add changeset
  • Loading branch information
lilnasy authored Jan 24, 2024
1 parent 0f664e7 commit 3435b7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/two-ducks-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/vercel": patch
---

Fixes an issue where the serverless function ignored cookies added using Astro.cookies.
2 changes: 1 addition & 1 deletion packages/integrations/vercel/src/serverless/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const createExports = (manifest: SSRManifest) => {
: Array.isArray(localsHeader)
? JSON.parse(localsHeader[0])
: {};
const webResponse = await app.render(req, { locals, clientAddress });
const webResponse = await app.render(req, { addCookieHeader: true, clientAddress, locals });
await NodeApp.writeResponse(webResponse, res);
};

Expand Down

0 comments on commit 3435b7f

Please sign in to comment.