mpociot / captainhook

Add Webhooks to your Laravel app, arrr
335 stars 26 forks source link

[Feature Request] Adding additional headers to outgoing webhook #47

Open oh-bala opened 6 years ago

oh-bala commented 6 years ago

So far looks like request post to webhook receiver is anonymous. Can this be a configuration of adding more header options?

For example: create a captain_hook.request_header callable (like $transformer), then we can use the $webhook object and original $header option, such as

// @file config/config.php
'request_header' => function ($webhook, $header = []) {
    return [
        'X-Hub-Signature' => 'sha1=xxxxxxxxxxxxxxxxxxxxx',
    ]
}