mirror of
https://github.com/symfony/recipes.git
synced 2026-09-20 11:36:33 +03:00
Merge pull request #724
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../4.4/config
|
||||
@@ -0,0 +1 @@
|
||||
../../../3.3/config/packages/cache.yaml
|
||||
@@ -0,0 +1,15 @@
|
||||
framework:
|
||||
#csrf_protection: true
|
||||
#http_method_override: true
|
||||
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
@@ -0,0 +1 @@
|
||||
../../../4.2/config/packages/test/
|
||||
@@ -0,0 +1 @@
|
||||
../../4.4/config/routes/
|
||||
@@ -0,0 +1 @@
|
||||
../../4.2/config/services.yaml
|
||||
@@ -1 +1 @@
|
||||
../4.4/manifest.json
|
||||
../4.2/manifest.json
|
||||
@@ -1 +1 @@
|
||||
../4.4/post-install.txt
|
||||
../4.2/post-install.txt
|
||||
@@ -1 +0,0 @@
|
||||
../4.4/public
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
use Symfony\Component\ErrorHandler\Debug;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
|
||||
if ($_SERVER['APP_DEBUG']) {
|
||||
umask(0000);
|
||||
|
||||
Debug::enable();
|
||||
}
|
||||
|
||||
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
|
||||
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
|
||||
}
|
||||
|
||||
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
|
||||
Request::setTrustedHosts([$trustedHosts]);
|
||||
}
|
||||
|
||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
||||
$request = Request::createFromGlobals();
|
||||
$response = $kernel->handle($request);
|
||||
$response->send();
|
||||
$kernel->terminate($request, $response);
|
||||
Reference in New Issue
Block a user