From a4fee04c2295f62c1405f9d5461b8e9637af9a25 Mon Sep 17 00:00:00 2001 From: "Julian J. M" Date: Thu, 21 Dec 2023 12:24:36 +0000 Subject: [PATCH] Set the content-type header to Application/json. This makes it compatible with Google Chat webhooks. --- src/inc/notifications/NotificationSlack.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inc/notifications/NotificationSlack.class.php b/src/inc/notifications/NotificationSlack.class.php index 75fe29770..67c85afce 100644 --- a/src/inc/notifications/NotificationSlack.class.php +++ b/src/inc/notifications/NotificationSlack.class.php @@ -36,6 +36,7 @@ function sendMessage($message, $subject = "") { curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, "true"); } + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);