Skip to content

Conversation

@jakedahn
Copy link
Contributor

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
Copy link
Contributor

mattt commented Aug 29, 2024

Thanks, @jakedahn!

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)

2 participants