captainhook icon indicating copy to clipboard operation
captainhook copied to clipboard

[Feature Request] Adding additional headers to outgoing webhook

Open oh-bala opened this issue 6 years ago • 0 comments

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',
    ]
}

oh-bala avatar May 29 '18 06:05 oh-bala