remix-aws
remix-aws copied to clipboard
Fix getting cookies from headers.
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.