|
|
@ -25,16 +25,7 @@ if ($_SERVER['APP_DEBUG']) { |
|
|
|
Debug::enable(); |
|
|
|
Debug::enable(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { |
|
|
|
|
|
|
|
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { |
|
|
|
|
|
|
|
Request::setTrustedHosts([$trustedHosts]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
|
|
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
|
|
|
|
|
|
|
|
|
|
$request = Request::createFromGlobals(); |
|
|
|
$request = Request::createFromGlobals(); |
|
|
|
$response = $kernel->handle($request); |
|
|
|
$response = $kernel->handle($request); |
|
|
|
$response->send(); |
|
|
|
$response->send(); |
|
|
|