We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c41379 commit a85ab64Copy full SHA for a85ab64
index.js
@@ -49,6 +49,11 @@ module.exports.serverless = appFn => {
49
const headers = lowerCaseKeys(event.headers)
50
const e = headers['x-github-event']
51
52
+ // If body is expected to be base64 encoded, decode it and continue
53
+ if (event.isBase64Encoded) {
54
+ event.body = Buffer.from(event.body, 'base64').toString('utf8')
55
+ }
56
+
57
// Convert the payload to an Object if API Gateway stringifies it
58
event.body = (typeof event.body === 'string') ? JSON.parse(event.body) : event.body
59
0 commit comments