From 58ab2b0c8e4223b6681d43f401e04bf23ad8972a Mon Sep 17 00:00:00 2001 From: alext Date: Sun, 24 Jun 2018 19:38:50 +0200 Subject: [PATCH] REST API response headers must use the Content-Type application/json value (#489). --- CHANGELOG.md | 2 +- src/engine/Api/V1/Response.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a2b554..5ca7fec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Fixed - #480: Make the app GDPR - new EU privacy regulations compliant. - +- #489: REST API response headers must use the Content-Type application/json value. ## [1.3.1] diff --git a/src/engine/Api/V1/Response.php b/src/engine/Api/V1/Response.php index 490ec050..6945167b 100644 --- a/src/engine/Api/V1/Response.php +++ b/src/engine/Api/V1/Response.php @@ -143,6 +143,7 @@ class Response { $header = $status ? $status->get() : '200 OK'; header('HTTP/1.0 ' . $header); + header('Content-Type: application/json'); echo json_encode($this->response, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);