Closed SachinShekhar closed 3 years ago
Thank you! I had just kicked myself for not getting around to this yet! Can you add a couple tests?
@dougmoscrop Done.
This seems to be a breaking change for payload version 1.0 however. You cannot set more than one cookie there because of this change :(
@vtrifonov I don't think I touched the behavior of payload version 1.0. Did you test your setup with previous version of this library?
yep, it works with 2.5.0, but doesn't work with 2.6.0. Only one of the cookies is set.
@vtrifonov I rechecked the code changes. Multiple cookies are being returned via multiValueHeaders
which is adherence with documentation.
Please, log the response before returning it in Lambda & paste it here. Also, show me what headers web browser is receiving.
API Gateway lambda proxy integration has special ways to deal with multi valued header which then gets translated to RFC standard adhering multiple separate headers. With event payload version 1.0, a
multiValueHeaders
array can be returned. With event payload version 2.0, a cookie array can be returned. This PR makes use of these features to replace existing hacks. A salute for creatingset-cookie.json
file (I literally laughed after seeing it), unfortunately it doesn't work with at least event payload version 2.0 despite it being in adherence with the standard.