summaryrefslogtreecommitdiff
path: root/pages/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api.php')
-rw-r--r--pages/api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/pages/api.php b/pages/api.php
index a1f13d9..1d83985 100644
--- a/pages/api.php
+++ b/pages/api.php
@@ -11,5 +11,7 @@ $toplevel = explode("/", $pagename)[1];
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php";
} else {
- header("Location: /?error=Endpoint not found: " . strip_tags($toplevel)) and die();
+ header("HTTP/1.1 500 Internal Server Error");
+ echo("Endpoint not found");
+ die();
} \ No newline at end of file