-
Notifications
You must be signed in to change notification settings - Fork 79
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
[BUG]: google-cloud-function, can not verify payload #935
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
You don't have to use the middleware included, you can use your own and call the functions directly. Maybe making the middleware more generic would work better and the exported node middleware would use the generic functions and extended for node usage. Also, can you share en example of how you are running this on GCF? |
Unfortunately the bot is propriatary software of my employer. But I can prove the validity of the issue via the gcf documentation:
Github sends the payload with content-type application/json, so gcf puts deserializes already the body and puts the javascript object into the req.body and the buffer into req.rawBody. |
🎉 This issue has been resolved in version 12.0.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What happened?
The request.body is already provided by gcf as an object. We expect that Lambda can provide request.body as a string but as it is an object in gcf it can not verify the request.body, because to verify the request.body is just using toString() of the object but not JSON.stringify.
Versions
v. 12.0.8
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: