Projekt

Obecné

Profil

Stáhnout (805 Bajtů) Statistiky
| Větev: | Revize:
1 579f9cdd Tomáš Ballák
<?php
2
3
use App\Kernel;
4
use Symfony\Component\ErrorHandler\Debug;
5
use Symfony\Component\HttpFoundation\Request;
6
7
require dirname(__DIR__).'/config/bootstrap.php';
8
9
if ($_SERVER['APP_DEBUG']) {
10
    umask(0000);
11
12
    Debug::enable();
13
}
14
15
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
16
    Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
17
}
18
19
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
20
    Request::setTrustedHosts([$trustedHosts]);
21
}
22
23
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
24
$request = Request::createFromGlobals();
25
$response = $kernel->handle($request);
26
$response->send();
27
$kernel->terminate($request, $response);