diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-06-03 16:57:15 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-06-03 16:57:15 +0300 |
| commit | 87fb1de91dda98c3deeb89b2c58548d5d8c4faf6 (patch) | |
| tree | fcc415f1ad6eaa94f8be2e3fe3a0c8c178f6abfe /public.php | |
| parent | 20950525216a45565953004f785ebbcbdded31b9 (diff) | |
| parent | 34c7e11d84059136ac8f526a6e179b29e62c6025 (diff) | |
Merge branch 'feature/json-mime-type' into 'master'
Use the official JSON MIME type of 'application/json'
See merge request tt-rss/tt-rss!146
Diffstat (limited to 'public.php')
| -rw-r--r-- | public.php | 4 |
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); } |