mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
fix(vercel): make Astro.cookies work again (#9809)
* addCookieHeaders * add changeset
This commit is contained in:
parent
0f664e7a0a
commit
3435b7f1e1
2 changed files with 6 additions and 1 deletions
5
.changeset/two-ducks-give.md
Normal file
5
.changeset/two-ducks-give.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/vercel": patch
|
||||
---
|
||||
|
||||
Fixes an issue where the serverless function ignored cookies added using Astro.cookies.
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue