diff --git a/src/lib/index.ts b/src/lib/index.ts index 9092bf1..bc7b291 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1 +1,2 @@ export * from './seam-webhook.js' +export { WebhookVerificationError as SeamWebhookVerificationError } from 'svix' diff --git a/src/lib/seam-webhook.ts b/src/lib/seam-webhook.ts index acfeee5..2a3210e 100644 --- a/src/lib/seam-webhook.ts +++ b/src/lib/seam-webhook.ts @@ -9,6 +9,10 @@ export class SeamWebhook { } verify(payload: string, headers: Record): SeamEvent { - return this.#webhook.verify(payload, headers) as SeamEvent + const normalizedHeaders = Object.fromEntries( + Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value]), + ) + + return this.#webhook.verify(payload, normalizedHeaders) as SeamEvent } }