You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@danielroe: It appears to properly set the cookies now, although I still have to use: event.headers.cookie = event.cookies.join("; "); over event.headers.cookie = event.cookies.join(","); in order to use the cookie library to parse them from the event, as the (more common?) convention is to use ; to separate them.
That said, I'm not sure if I can necessarily insist that nitro should be using ; to separate the cookies. I can at least get away with doing parse((req.headers.cookie || '').replace(/,/g, ';')) in my actual code instead of having to modify the built mjs for that particular issue. (Which should be safe since neither , or ; are supposed to actually appear in cookies....)
@pi0
I have tried this and it doesn't work.
I configured Amazon API Gateway proxy integration to work with an AWS Lambda function. When I call my endpoint, I receive a configuration error and an HTTP 502 status code.
Execution failed due to configuration error: Malformed Lambda proxy response
This is due to the fact that cookies are returned in the response object.
For API Gateway to handle a Lambda function's response, the function must return output according to the following JSON format. Additional fields are not allowed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
resolves #245
❓ Type of change
📚 Description
This PR returns an array of cookies to set from aws-lambda preset rather than keeping them on the headers. More info in AWS docs.
@brtinney - would be grateful if you could confirm this resolves the issue for you.
📝 Checklist