Add Content-Type: application/json header to API responses

This commit is contained in:
Guillermo Pages
2026-01-27 20:29:05 +01:00
parent 68bfb7fdbb
commit 075a8f68c4

View File

@@ -24,7 +24,8 @@ class Renderer
public function render($status, $data)
{
header(sprintf('HTTP/1.0 %s %s', $status, self::$statusMessages[$status]));
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=utf-8");
ob_clean();
flush();