craftcms / webhooks

Plugin for integrating Craft with Zapier and IFTTT.
https://plugins.craftcms.com/webhooks
MIT License
84 stars 12 forks source link

Add event to customize webhook request data #87

Open sanderpotjer opened 11 months ago

sanderpotjer commented 11 months ago

It would be great if an event can be added that allows to customize the data before a webhook request is queued up. For example to change the headers and body of the webhook request.

This would allow to set a hashed signature of the webhook as header, based on the body data. Like the commonly used hash_hmac('sha256', $rawRequestContent, 'secretKey'); header as signature.

Currently the webhooks plugin doesn't offer an option to set this, or offering an event to set via custom code. So by having the event this and other customizations can take place.