8000 chore: remove useless trusted proxies environement variables (#651) · dunglas/symfony-docker@8743b6d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8743b6d

Browse files
authored
chore: remove useless trusted proxies environement variables (#651)
1 parent 32b95a1 commit 8743b6d

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ services:
66
SERVER_NAME: ${SERVER_NAME:-localhost}, php:80
77
MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
88
MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
9-
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16}
10-
TRUSTED_HOSTS: ${TRUSTED_HOSTS:-^${SERVER_NAME:-example\.com|localhost}|php$$}
119
# Run "composer require symfony/orm-pack" to install and configure Doctrine ORM
1210
DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
1311
# Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration

docs/tls.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ To disable HTTPS, configure your environment to use HTTP by setting the followin
4545
```bash
4646
SERVER_NAME=http://localhost \
4747
MERCURE_PUBLIC_URL=http://localhost/.well-known/mercure \
48-
TRUSTED_HOSTS='^localhost|php$' \
4948
docker compose up --pull always -d --wait
5049
```
5150

docs/troubleshooting.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
If you work on linux and cannot edit some of the project files right after the first installation, you can run `docker compose run --rm php chown -R $(id -u):$(id -g) .` to set yourself as owner of the project files that were created by the docker container.
66

7-
## HTTPs and Redirects
8-
9-
If Symfony is generating an internal redirect for an `https://` url, but the resulting url is `http://`, you have to uncomment the `TRUSTED_PROXIES` setting in your `.env` file and add this line in `config/packages/framework.yaml`:
10-
```
11-
# config/packages/framework.yaml
12-
framework:
13-
trusted_proxies: '%env(TRUSTED_PROXIES)%'
14-
```
15-
16-
For more details see the [Symfony internal redirect documentation](https://symfony.com/doc/current/routing.html#redirecting-to-urls-and-routes-directly-from-a-route).
17-
187
## TLS/HTTPS Issues
198

209
See more in the [TLS section](tls.md)

0 commit comments

Comments
 (0)
0