@airdraft/plugin-webhooks
v0.1.3
Published
Signed publication webhooks for Airdraft
Downloads
770
Readme
@airdraft/plugin-webhooks
Delivers signed, versioned webhook events when publish-enabled Airdraft content is published, updated while published, unpublished, or deleted.
import { withPublicationWebhook } from '@airdraft/plugin-webhooks'
withPublicationWebhook({
endpoint: process.env.AIRDRAFT_PUBLICATION_WEBHOOK_URL!,
secret: process.env.AIRDRAFT_PUBLICATION_WEBHOOK_SECRET!,
projectId: process.env.AIRDRAFT_PROJECT_ID!,
})Requests include X-Airdraft-Event-Id, X-Airdraft-Timestamp, and X-Airdraft-Signature. Verify the signature against <timestamp>.<raw request body> using HMAC-SHA256.
