summaryrefslogtreecommitdiff
path: root/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'app.php')
-rw-r--r--app.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app.php b/app.php
index 8033207..6506a4a 100644
--- a/app.php
+++ b/app.php
@@ -2,8 +2,10 @@
ob_start();
-require_once $_SERVER['DOCUMENT_ROOT'] . "/error.php";
-set_error_handler("ch_error");
+if (!str_starts_with($_SERVER['REQUEST_URI'], "/api")) {
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/error.php";
+ set_error_handler("ch_error");
+}
$start = microtime(true);
$GLOBALS["ColdHazeStart"] = microtime(true);