REST API response headers must use the Content-Type application/json value (#489).

This commit is contained in:
alext 2018-06-24 19:38:50 +02:00
parent ba33755032
commit 58ab2b0c8e
2 changed files with 2 additions and 1 deletions

View file

@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Fixed ## Fixed
- #480: Make the app GDPR - new EU privacy regulations compliant. - #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] ## [1.3.1]

View file

@ -143,6 +143,7 @@ class Response {
$header = $status ? $status->get() : '200 OK'; $header = $status ? $status->get() : '200 OK';
header('HTTP/1.0 ' . $header); header('HTTP/1.0 ' . $header);
header('Content-Type: application/json');
echo json_encode($this->response, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); echo json_encode($this->response, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);