Skip to content
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(aws-lambda): handle event. isBase64Encoded #1779

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

michael-bouvy
Copy link
Contributor

πŸ”— Linked issue

#1778

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When POSTing a body to an AWS Lambda function, either using a function URL or behind an API Gateway, the event.body may be base64 encoded ; when this is the case, event.isBase64Encoded is set to true.

In such cases, body transmitted to local Nitro call should be base64 decoded.

Resolves #1778

πŸ“ Checklist

  • I have linked an issue or discussion.
  • [] I have updated the documentation accordingly.

@pi0
Copy link
Member

pi0 commented Oct 3, 2023

Thanks!

@pi0 pi0 changed the title fix(aws-lambda): handle base64 body in AWS Lambda preset fix(aws-lambda): handle event. isBase64Encoded Oct 3, 2023
@pi0 pi0 merged commit b29f800 into nitrojs:main Oct 3, 2023
4 of 6 checks passed
@michael-bouvy michael-bouvy deleted the handle-aws-lambda-base64 branch October 3, 2023 16:23
@michael-bouvy
Copy link
Contributor Author

Thanks @pi0 for the merge, took me a while to find the root cause of my issues (with @sidebase/nuxt-auth) yesterday πŸ˜…

@pi0 pi0 mentioned this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Lambda preset not handling Base64 encoded body
2 participants