astro/packages
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
..
astro Fix injected scripts not injected to injected routes (#7262) 2023-06-06 10:08:38 -05:00
astro-prism [ci] release (#7090) 2023-05-18 12:31:59 -04:00
astro-rss [ci] release (#7161) 2023-05-22 09:48:21 -04:00
create-astro [ci] release (#7278) 2023-06-02 13:17:55 -05:00
integrations #7226 - fixes NodeJS adapter for multiple set-cookie headers (and other header issues) (#7227) 2023-06-06 10:09:16 -05:00
internal-helpers Redirects (#7067) 2023-06-05 09:03:20 -04:00
markdown [ci] release (#7090) 2023-05-18 12:31:59 -04:00
telemetry Add global crypto to @astrojs/webapi (#6981) 2023-05-26 15:02:35 +02:00
underscore-redirects [ci] format 2023-06-05 13:05:47 +00:00
webapi [ci] release (#7190) 2023-05-30 16:53:55 -04:00