Skip to content

Commit 40cb42d

Browse files
committed
fix(webhooks): Explicitly set Content-Length to prevent undici mismatch errors
1 parent 06e1971 commit 40cb42d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

workers/webhooks.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ const notifyWorker = new Worker(
387387
}
388388
let body = Buffer.from(JSON.stringify(webhookPayload));
389389

390+
// Explicitly set Content-Length to prevent undici mismatch errors
391+
headers['Content-Length'] = body.length.toString();
392+
390393
const serviceSecret = await getServiceSecret();
391394
let hmac = createHmac('sha256', serviceSecret);
392395
hmac.update(body);

0 commit comments

Comments
 (0)