Add headless mode

This commit is contained in:
Alma Armas 2020-11-29 17:15:31 +00:00
parent f64b7ad339
commit f76d988e54

View file

@ -124,17 +124,19 @@ class Bootstrap
* @internal * @internal
* @return void * @return void
*/ */
function ignite(): void function ignite(bool $headless = false): void
{ {
header("Referrer-Policy: strict-origin-when-cross-origin");
$this->registerFunctions(); $this->registerFunctions();
$this->registerAutoloaders(); $this->registerAutoloaders();
$this->defineIP();
$this->registerDebugger(); $this->registerDebugger();
$this->igniteExtensions(); $this->igniteExtensions();
if(!$headless) {
header("Referrer-Policy: strict-origin-when-cross-origin");
$this->defineIP();
$this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]); $this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]);
} }
} }
}
return new Bootstrap; return new Bootstrap;