astro/packages/integrations
Alex Sherwin 4929332c32
#7226 - fixes NodeJS adapter for multiple set-cookie headers (and other header issues) (#7227)
* Utilizes the new standard WebAPI Fetch Headers.getSetCookie() function
to safely handle multiple set-cookie headers when converting from a
WebAPI Response to a NodeJS ServerResponse

Modifies the existing nodeMiddleware logic which first set AstroCookies
on ServerResponse.setHeader(...) and then called
ServerResponse.writeHead(status, Response.headers) which means any that
if the WebAPI Response had any set-cookie headers on it, they would
replace anything from AstroCookies.

The new logic delegates appending AstroCookie values onto the WebAPI
Response Headers object, so that a single unified function safely
converts the WebAPI Response Headers into a NodeJS compatible
OutgoingHttpHeaders object utilizing the new standard
Headers.getSetCookie() function provided by the undici WebAPI polyfills.

Plus extensive test coverage.

* #7226 - changeset for NodeJS adapter set-cookie fix

* fixing all double quotes to single quotes

---------

Co-authored-by: Alex Sherwin <alex.sherwin@acadia.inc>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-06-06 10:09:16 -05:00
..
alpinejs [ci] release (#7090) 2023-05-18 12:31:59 -04:00
cloudflare Unflag hybrid output (#7260) 2023-06-05 13:19:15 -05:00
deno Simplify Deno test (#7276) 2023-06-05 15:05:16 +08:00
image Unflag hybrid output (#7260) 2023-06-05 13:19:15 -05:00
lit [ci] release (#7090) 2023-05-18 12:31:59 -04:00
markdoc [ci] release (#7254) 2023-06-02 10:51:28 -04:00
mdx [ci] release (#7254) 2023-06-02 10:51:28 -04:00
netlify fix note syntax in Netlify README (#7305) 2023-06-06 09:50:44 -05:00
node #7226 - fixes NodeJS adapter for multiple set-cookie headers (and other header issues) (#7227) 2023-06-06 10:09:16 -05:00
partytown [ci] release (#7190) 2023-05-30 16:53:55 -04:00
preact [ci] release (#7190) 2023-05-30 16:53:55 -04:00
prefetch [ci] release (#7130) 2023-05-21 00:00:31 +08:00
react [ci] release (#7190) 2023-05-30 16:53:55 -04:00
sitemap [ci] release (#7254) 2023-06-02 10:51:28 -04:00
solid [ci] release (#7090) 2023-05-18 12:31:59 -04:00
svelte [ci] release (#7254) 2023-06-02 10:51:28 -04:00
tailwind [ci] release (#7254) 2023-06-02 10:51:28 -04:00
turbolinks [ci] release (#7090) 2023-05-18 12:31:59 -04:00
vercel Unflag hybrid output (#7260) 2023-06-05 13:19:15 -05:00
vue [ci] release (#7254) 2023-06-02 10:51:28 -04:00