-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix aws api gateway v2 event source cookies handling #389
Conversation
responseToApiGateway.cookies = headers['set-cookie'] | ||
responseToApiGateway.cookies = Array.isArray(headers['set-cookie']) ? headers['set-cookie'] : [headers['set-cookie']] | ||
delete headers['set-cookie'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we can remove some repeated code
if(cookies = headers['set-cookie']) {
responseToApiGateway.cookies = Array.isArray(cookies) ? cookies: [cookies]
delete headers['set-cookie']
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your reviewing.
I refactored and push it.
Can you check it again? thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the failing tests
## [4.3.5](v4.3.4...v4.3.5) (2021-05-11) ### Bug Fixes * fix aws api gateway v2 event source cookies handling ([#389](#389)) ([6e0868c](6e0868c))
🎉 This PR is included in version 4.3.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [4.3.5](CodeGenieApp/serverless-express@v4.3.4...v4.3.5) (2021-05-11) ### Bug Fixes * fix aws api gateway v2 event source cookies handling ([#389](CodeGenieApp/serverless-express#389)) ([6e0868c](CodeGenieApp/serverless-express@6e0868c))
Issue #, if available:
Issue #388
Description of changes:
Change AWS API Gateway v2 event source
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.