From 9aa49c9c2cf80265d6740efbbdf6e3bbe88da8d5 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Sun, 27 Apr 2025 23:04:10 -0400 Subject: [PATCH] fix: index.php --- public/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.php b/public/index.php index f3e92f9..6a1165a 100644 --- a/public/index.php +++ b/public/index.php @@ -2,8 +2,8 @@ use App\Kernel; -if (preg_match("/js\/data\.json$/", $_SERVER['REQUEST_URI'])) { - print file_get_contents('js/data.json'); +if (file_exists(__DIR__.$_SERVER['REQUEST_URI']) && is_readable(__DIR__.$_SERVER['REQUEST_URI']) && is_file(__DIR__.$_SERVER['REQUEST_URI'])) { + print file_get_contents(__DIR__.$_SERVER['REQUEST_URI']); exit; }