MDL-72080 javascript: explicit Content-Type in service responses.

This fixes various external methods that initialize page output
manually, e.g. `core_get_fragment`, which can mess with third party
proxies that modify data in transit because of the current default
response type header (text/html).

Co-authored-by: Mario Torres
This commit is contained in:
Paul Holden
2025-01-28 12:45:22 +00:00
co-authored by Mario Torres
parent bcf06a0484
commit 2fd885cd85
+1
View File
@@ -115,4 +115,5 @@ if ($cacherequest && !$haserror) {
header('Accept-Ranges: none');
}
header('Content-Type: application/json; charset=utf-8');
echo json_encode($responses);