Use the official JSON MIME type of 'application/json'.

This commit is contained in:
wn_
2025-06-02 20:57:31 +00:00
parent 2095052521
commit 34c7e11d84
5 changed files with 17 additions and 17 deletions

View File

@@ -34,7 +34,7 @@
if (str_starts_with($method, "_")) {
user_error("Refusing to invoke method $method which starts with underscore.", E_USER_WARNING);
header("Content-Type: text/json");
header("Content-Type: application/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
return;
@@ -49,7 +49,7 @@
$handler->$method();
} else {
user_error("Refusing to invoke method $method which has required parameters.", E_USER_WARNING);
header("Content-Type: text/json");
header("Content-Type: application/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
}