aboutsummaryrefslogtreecommitdiff
path: root/public.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2025-06-02 20:57:31 +0000
committerwn_ <invalid@email.com>2025-06-03 13:53:12 +0000
commit34c7e11d84059136ac8f526a6e179b29e62c6025 (patch)
treefcc415f1ad6eaa94f8be2e3fe3a0c8c178f6abfe /public.php
parent20950525216a45565953004f785ebbcbdded31b9 (diff)
Use the official JSON MIME type of 'application/json'.
Diffstat (limited to 'public.php')
-rw-r--r--public.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/public.php b/public.php
index 5d99fe519..68327c2d7 100644
--- a/public.php
+++ b/public.php
@@ -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);
}