fix custom headers not being applied on webhook (#374)
This commit is contained in:
parent
4342787ace
commit
25a445e88d
@ -477,8 +477,9 @@
|
||||
curl_setopt($ch, CURLOPT_URL, $webhook['url']);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $webhook['request_method']);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload_json));
|
||||
if (!empty($customheaders)) {
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $webhook['headers']);
|
||||
if (!empty($webhook['headers'])) {
|
||||
$customheaders = preg_split("/\r\n|\n|\r/", $webhook['headers']);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $customheaders);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user