diff --git a/html/includes/forms/callback-clear.inc.php b/html/includes/forms/callback-clear.inc.php index 38d990639..f0fb77576 100644 --- a/html/includes/forms/callback-clear.inc.php +++ b/html/includes/forms/callback-clear.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/callback-statistics.inc.php b/html/includes/forms/callback-statistics.inc.php index 36a2c4d9d..1b25df57b 100644 --- a/html/includes/forms/callback-statistics.inc.php +++ b/html/includes/forms/callback-statistics.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/notifications.inc.php b/html/includes/forms/notifications.inc.php index 187f2ee2c..71c615085 100644 --- a/html/includes/forms/notifications.inc.php +++ b/html/includes/forms/notifications.inc.php @@ -21,6 +21,7 @@ * @package LibreNMS * @subpackage Notifications */ +header('Content-type: application/json'); $status = 'error'; $message = 'unknown error'; diff --git a/html/includes/forms/parse-template-rules.inc.php b/html/includes/forms/parse-template-rules.inc.php index b5800b50f..7211bc2b2 100644 --- a/html/includes/forms/parse-template-rules.inc.php +++ b/html/includes/forms/parse-template-rules.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -24,5 +25,6 @@ if (is_numeric($template_id) && $template_id > 0) { } $output = array('rule_id' => $rules); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/query-ripenccapi.inc.php b/html/includes/forms/query-ripenccapi.inc.php index 0e21b12fe..e9af57177 100644 --- a/html/includes/forms/query-ripenccapi.inc.php +++ b/html/includes/forms/query-ripenccapi.inc.php @@ -9,6 +9,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: application/json'); $status = 'error'; $message = 'unknown error'; diff --git a/html/includes/forms/schedule-maintenance.inc.php b/html/includes/forms/schedule-maintenance.inc.php index d601116ee..40a39e613 100644 --- a/html/includes/forms/schedule-maintenance.inc.php +++ b/html/includes/forms/schedule-maintenance.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -128,5 +129,5 @@ else if ($sub_type == 'del-maintenance') { 'message' => $message, ); }//end if - +header('Content-type: application/json'); echo _json_encode($response); diff --git a/html/includes/forms/test-transport.inc.php b/html/includes/forms/test-transport.inc.php index 05b4dcfdd..81da4e40b 100644 --- a/html/includes/forms/test-transport.inc.php +++ b/html/includes/forms/test-transport.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -50,5 +51,5 @@ if (file_exists($config['install_dir']."/includes/alerts/transport.".$transport. } } } - +header('Content-type: application/json'); echo _json_encode(array('status' => $status)); diff --git a/html/includes/forms/token-item-create.inc.php b/html/includes/forms/token-item-create.inc.php index 61810287a..7e573b2ac 100644 --- a/html/includes/forms/token-item-create.inc.php +++ b/html/includes/forms/token-item-create.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/token-item-disable.inc.php b/html/includes/forms/token-item-disable.inc.php index 1f962c020..f05796127 100644 --- a/html/includes/forms/token-item-disable.inc.php +++ b/html/includes/forms/token-item-disable.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/token-item-remove.inc.php b/html/includes/forms/token-item-remove.inc.php index 4d494672c..4c241bedc 100644 --- a/html/includes/forms/token-item-remove.inc.php +++ b/html/includes/forms/token-item-remove.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/update-notes.inc.php b/html/includes/forms/update-notes.inc.php index 3750e59d9..521a485bf 100644 --- a/html/includes/forms/update-notes.inc.php +++ b/html/includes/forms/update-notes.inc.php @@ -9,6 +9,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: application/json'); $status = 'error'; $message = 'unknown error'; diff --git a/html/includes/forms/widget-settings.inc.php b/html/includes/forms/widget-settings.inc.php index fabe6c4aa..10ed3ad57 100644 --- a/html/includes/forms/widget-settings.inc.php +++ b/html/includes/forms/widget-settings.inc.php @@ -21,6 +21,7 @@ * @package LibreNMS * @subpackage Widgets */ +header('Content-type: application/json'); $status = 'error'; $message = 'unknown error';