We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa37fa6 commit 080756cCopy full SHA for 080756c
1 file changed
Plugins/VercelPackager/Server/server.js
@@ -54,9 +54,9 @@ const server = http.createServer(async (req, res) => {
54
const body = await readBody(req)
55
const _res = await invoke({ method, path, headers, body })
56
const _body = JSON.parse(await readBody(_res))
57
- console.log(_body)
+ const encoding = _body.isBase64Encoded ? 'base64' : 'utf8'
58
res.writeHead(_body.statusCode, _body.headers)
59
- res.end(Buffer.from(_body.body || '', _body.isBase64Encoded ? 'base64' : 'utf8'))
+ res.end(Buffer.from(_body.body || '', encoding))
60
} catch (err) {
61
console.error(err)
62
res.writeHead(500, {})
0 commit comments