Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.
fix custom headers not being applied on webhook (#374)
rvelasq25a445e88d8b
diff --git a/endpoints/cronjobs/sendnotifications.php b/endpoints/cronjobs/sendnotifications.phpindex 58abdcc..44c2118 100644--- a/endpoints/cronjobs/sendnotifications.php+++ b/endpoints/cronjobs/sendnotifications.php@@ -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);