mirror of
https://github.com/openvk/chandler.git
synced 2025-02-02 04:25:25 +03:00
Add headless mode
This commit is contained in:
parent
f64b7ad339
commit
f76d988e54
1 changed files with 7 additions and 5 deletions
|
@ -124,16 +124,18 @@ 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();
|
||||||
$this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]);
|
|
||||||
|
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"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue