diff --git a/chandler/Bootstrap.php b/chandler/Bootstrap.php index 15cc132..e2dd106 100644 --- a/chandler/Bootstrap.php +++ b/chandler/Bootstrap.php @@ -70,21 +70,14 @@ class Bootstrap } /** - * Starts framework. - * * @return void - * @internal */ - function ignite(bool $headless = false): void + function ignite(): void { $this->registerFunctions(); $this->registerDebugger(); $this->igniteExtensions(); - if (!$headless) { - header("Referrer-Policy: strict-origin-when-cross-origin"); - $this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]); - } + header("Referrer-Policy: strict-origin-when-cross-origin"); + $this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]); } } - -return new Bootstrap; diff --git a/public/index.php b/public/index.php index aa750ff..282d4a7 100644 --- a/public/index.php +++ b/public/index.php @@ -7,6 +7,6 @@ require_once(dirname(__DIR__) . "/vendor/autoload.php"); define("CHANDLER_ROOT", dirname(__DIR__)); define("CHANDLER_ROOT_CONF", yaml_parse_file(CHANDLER_ROOT . "/chandler.yml")); -$bootstrap = require("../chandler/Bootstrap.php"); +$bootstrap = new Bootstrap(); $bootstrap->ignite();