diff --git a/config/preload.php b/config/preload.php new file mode 100644 index 0000000..5ebcdb2 --- /dev/null +++ b/config/preload.php @@ -0,0 +1,5 @@ + - - - + diff --git a/public/index.php b/public/index.php index 3f8b90e..3bcee0b 100644 --- a/public/index.php +++ b/public/index.php @@ -15,14 +15,6 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); -} - -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { - Request::setTrustedHosts([$trustedHosts]); -} - $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); $request = Request::createFromGlobals(); $response = $kernel->handle($request); diff --git a/src/Kernel.php b/src/Kernel.php index b016861..655e796 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -17,7 +17,7 @@ class Kernel extends BaseKernel $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); if (is_file(\dirname(__DIR__).'/config/services.yaml')) { - $container->import('../config/{services}.yaml'); + $container->import('../config/services.yaml'); $container->import('../config/{services}_'.$this->environment.'.yaml'); } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { (require $path)($container->withPath($path), $this); @@ -30,7 +30,7 @@ class Kernel extends BaseKernel $routes->import('../config/{routes}/*.yaml'); if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { - $routes->import('../config/{routes}.yaml'); + $routes->import('../config/routes.yaml'); } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { (require $path)($routes->withPath($path), $this); } diff --git a/symfony.lock b/symfony.lock index 24e4c93..6cba408 100644 --- a/symfony.lock +++ b/symfony.lock @@ -266,17 +266,18 @@ "version": "v5.0.7" }, "symfony/framework-bundle": { - "version": "5.1", + "version": "5.2", "recipe": { "repo": "github.com/symfony/recipes", "branch": "master", - "version": "5.1", - "ref": "e1b2770f2404d8307450a49cabfc3b2ff3184792" + "version": "5.2", + "ref": "6ec87563dcc85cd0c48856dcfbfc29610506d250" }, "files": [ "./config/packages/cache.yaml", "./config/packages/framework.yaml", "./config/packages/test/framework.yaml", + "./config/preload.php", "./config/routes/dev/framework.yaml", "./config/services.yaml", "./public/index.php",