summaryrefslogtreecommitdiff
path: root/templates/themes/calendar/calendarpost.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/themes/calendar/calendarpost.php')
-rw-r--r--templates/themes/calendar/calendarpost.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/themes/calendar/calendarpost.php b/templates/themes/calendar/calendarpost.php
index ac2c1a72..7ad9377a 100644
--- a/templates/themes/calendar/calendarpost.php
+++ b/templates/themes/calendar/calendarpost.php
@@ -51,7 +51,11 @@ $method = $_SERVER['REQUEST_METHOD'];
} elseif ($method == 'GET') {
// Method is GET
$query = query("SELECT * FROM calendar_events ORDER BY id") or error(db_error());
- echo json_encode($query->fetchAll(PDO::FETCH_ASSOC), JSON_THROW_ON_ERROR);
+
+ header('Content-Type: application/json; charset=utf-8');
+ header('X-Content-Type-Options: nosniff');
+
+ echo json_encode($query->fetchAll(PDO::FETCH_ASSOC), JSON_THROW_ON_ERROR);
}
?>