From b6a8617c4c59645821a85d0ddc753e09948fc0a4 Mon Sep 17 00:00:00 2001 From: jhuesser Date: Thu, 7 Jun 2018 21:42:06 +0200 Subject: [PATCH] added json headers to api response --- api/incidents.php | 3 ++- api/status.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/incidents.php b/api/incidents.php index ebd553b..105509f 100644 --- a/api/incidents.php +++ b/api/incidents.php @@ -13,6 +13,7 @@ else{ $timestamp = (isset($_GET['timestamp']))?$_GET['timestamp']:time(); $result = $constellation->get_incidents((isset($_GET['future'])?$_GET['future']:false), $offset, $limit, $timestamp); - + header('Cache-Control: no-cache'); + header('Content-type: application/json'); echo json_encode($result); } \ No newline at end of file diff --git a/api/status.php b/api/status.php index a3e3a92..5ace02d 100644 --- a/api/status.php +++ b/api/status.php @@ -7,6 +7,8 @@ if (!file_exists("../config.php")) else{ require_once("../config.php"); require_once("../classes/constellation.php"); + header('Cache-Control: no-cache'); + header('Content-type: application/json'); if (!isset($_GET['id'])) {