Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Aug 29, 2024

Duplicate of #298, but opened on a branch rather than a fork to run integration tests.


This pull request fixes: #297


To make the validateWebhook function backward compatible with Node.js 18.x and Next.js 12.x, we need to access the headers with a slightly different syntax.

After making that adjustment, I also discovered a version incompatibility with the requestData.body value. I fixed that by stringifying the requestData.body, and then the validateWebhook function started working as expected.

@mattt mattt closed this Aug 29, 2024
@mattt mattt deleted the mattt/fix-validate-webhook-node-18 branch August 29, 2024 12:52
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.

The validateWebhook function crashes in nodejs v0.18.x when called from Next.js 12.1.0 (pages router)

1 participant