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:
co-authored by
Mario Torres
parent
bcf06a0484
commit
2fd885cd85
@@ -115,4 +115,5 @@ if ($cacherequest && !$haserror) {
|
||||
header('Accept-Ranges: none');
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($responses);
|
||||
|
||||
Reference in New Issue
Block a user