remix-aws icon indicating copy to clipboard operation
remix-aws copied to clipboard

Fix getting cookies from headers.

Open gotgenes opened this issue 7 months ago • 5 comments

Fixes an issue in the API Gateway v2 adapter where the call to headers.raw() throws the following error:

TypeError: nodeResponse.headers.raw is not a function

As described in remix-run/remix#4354, the headers.raw() method is not available in the Headers class in Node.js. This change replaces the headers.raw() method with headers.entries() from the Fetch API to fix the issue.

Edit: The original approach used headers.getSetCookie(), but @wingleung informed me this is not available in Node 18. The original PR also included dependency updates, which I since removed.

gotgenes avatar Jun 25 '24 01:06 gotgenes