Repository navigation
[COMMEX-2359] Answer direct-call webhook failures with the middleware's status and body in the README - #1545
Open
jolinger-godaddy wants to merge 2 commits into
Conversation
verifyWebhookSubscription now compares in constant time, signs the exact body bytes, accepts a space-separated list of v1 signatures, and gains a strictRawBody option and an optional toleranceSeconds (off by default). The Express and TanStack webhook middleware turn strictRawBody on; Express reads req.rawBody when kept. Setup problems (raw body lost, no secret) are answered with 500 instead of 401.
…'s status and body in the README The direct-call webhook example returned the raw verification error, so a handler copied from it would send setup-failure detail to an unsigned caller. It now answers with webhookFailureStatus and webhookFailureBody, as the middleware and the Next.js example do, and keeps the detail in the app's own logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira
https://godaddy-corp.atlassian.net/browse/COMMEX-2359
Small README follow-up to #1544, stacked on it. Both branches live on a fork, so this PR targets main and also shows #1544's commit; the only new change is the last commit (ad67471). Merge it after #1544.
The direct-call webhook example returned the raw verification error, so a handler copied from it would send setup-failure detail (no raw body, no secret) to an unsigned caller. It now answers with
webhookFailureStatusandwebhookFailureBody, the same way the middleware and the Next.js example do, and keeps the detail in the app's own logs.Docs only. No changeset, since it ships in the same app-connect release as #1544.