Update docs "Troubleshooting -> HTTPs and Redirects" section

This commit is contained in:
Dmitriy Kislitsyn 2024-02-23 18:32:04 +06:00 committed by Maxime Helias
parent 05d72b4aae
commit 737029b008

View File

@ -6,7 +6,13 @@ If you work on linux and cannot edit some of the project files right after the f
## HTTPs and Redirects ## HTTPs and Redirects
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. 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`:
```
# config/packages/framework.yaml
framework:
trusted_proxies: '%env(TRUSTED_PROXIES)%'
```
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). 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).
## TLS/HTTPS Issues ## TLS/HTTPS Issues