Closed dthyresson closed 2 years ago
As part of the issue noted in Discourse https://community.redwoodjs.com/t/help-webhook-works-in-dev-but-not-at-netlify/2668/2 realized that the Webhook examples did not include Content Type headers which could cause issues when deployed to Netlify and getting the error decoding lambda response.
error decoding lambda response
As @dac09 notes:
looks like the content type on your success path is incorrect. It’s probably a good idea to be consistent and always respond with the same content type headers
e.g.
return { statusCode: 200, headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ now: Date.now()}) }
This PR adds those headers into the example code.
As part of the issue noted in Discourse https://community.redwoodjs.com/t/help-webhook-works-in-dev-but-not-at-netlify/2668/2 realized that the Webhook examples did not include Content Type headers which could cause issues when deployed to Netlify and getting the
error decoding lambda response
.As @dac09 notes:
e.g.
This PR adds those headers into the example code.