Deps: upgrade recipes for symfony/framework-bundle

This commit is contained in:
Julien Fastré 2022-12-29 23:07:06 +01:00
parent da2f5f37c0
commit f80d2c47ce
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
5 changed files with 20 additions and 17 deletions

20
.env
View File

@ -3,18 +3,16 @@
## `$ composer symfony:dump-env prod` ## `$ composer symfony:dump-env prod`
## ##
## Project environment
# this should be set in docker-compose.yml file
# APP_ENV=prod
## Enable debug
APP_DEBUG=false
## Locale ## Locale
LOCALE=fr LOCALE=fr
## Framework secret ###> symfony/framework-bundle ###
APP_SECRET=ThisTokenIsNotSoSecretChangeIt # this should be set in docker-compose.yml file
APP_ENV=prod
APP_SECRET=ChangeItf2b58287ef7f9976409d3f6c72529e99ChangeIt
TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
TRUSTED_HOSTS='^(localhost|example\.com|nginx)$'
###< symfony/framework-bundle ###
## Wopi server for editing documents online ## Wopi server for editing documents online
WOPI_SERVER=http://collabora:9980 WOPI_SERVER=http://collabora:9980
@ -22,10 +20,6 @@ WOPI_SERVER=http://collabora:9980
# must be manually set in .env.local # must be manually set in .env.local
# ADMIN_PASSWORD= # ADMIN_PASSWORD=
## Symfony/framework-bundle
TRUSTED_HOSTS='^(localhost|127.0.0.1|test.localde)$'
TRUSTED_PROXIES=~
## Symfony/swiftmailer ## Symfony/swiftmailer
## Mailer ## Mailer
###> symfony/mailer ### ###> symfony/mailer ###

9
config/preload.php Normal file
View File

@ -0,0 +1,9 @@
<?php
if (file_exists(dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php';
}
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}

View File

@ -19,7 +19,6 @@ services:
- '../src/DependencyInjection/' - '../src/DependencyInjection/'
- '../src/Entity/' - '../src/Entity/'
- '../src/Kernel.php' - '../src/Kernel.php'
- '../src/Tests/'
# controllers are imported separately to make sure services can be injected # controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class # as action arguments even if you don't extend any base controller class

View File

@ -13,7 +13,7 @@ if ($_SERVER['APP_DEBUG']) {
} }
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); 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) { if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {

View File

@ -543,15 +543,16 @@
"version": "4.4", "version": "4.4",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "main",
"version": "4.4", "version": "4.4",
"ref": "af2e2efad553bc959a0c61d9185e33ca9eec5c99" "ref": "24eb45d1355810154890460e6a05c0ca27318fe7"
}, },
"files": [ "files": [
"config/bootstrap.php", "config/bootstrap.php",
"config/packages/cache.yaml", "config/packages/cache.yaml",
"config/packages/framework.yaml", "config/packages/framework.yaml",
"config/packages/test/framework.yaml", "config/packages/test/framework.yaml",
"config/preload.php",
"config/routes/dev/framework.yaml", "config/routes/dev/framework.yaml",
"config/services.yaml", "config/services.yaml",
"public/index.php", "public/index.php",