loadEnv(dirname(__DIR__).'/.env'); $trustedIp = array_filter( explode(',', $_SERVER['DEBUG_TRUSTED_IP'] ?? ''), static function ($ip): bool { return filter_var($ip, \FILTER_VALIDATE_IP); } ); if (false === in_array(Request::createFromGlobals()->getClientIp(), $trustedIp)) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file.'); } umask(0000); Debug::enable(); $thelia = new App\Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); $request = Request::createFromGlobals(); $response = $thelia->handle($request); $response->send(); $thelia->terminate($request, $response);