added json headers to api response

This commit is contained in:
jhuesser 2018-06-07 21:42:06 +02:00
parent c115899350
commit b6a8617c4c
2 changed files with 4 additions and 1 deletions

View File

@ -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);
}

View File

@ -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']))
{