Skip to content

Commit

Permalink
fix custom headers not being applied on webhook (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvelasq authored Jun 5, 2024
1 parent 4342787 commit 25a445e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions endpoints/cronjobs/sendnotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 25a445e

Please sign in to comment.