From 737029b008f0184ce596110bcc06eed6cd16c902 Mon Sep 17 00:00:00 2001 From: Dmitriy Kislitsyn Date: Fri, 23 Feb 2024 18:32:04 +0600 Subject: [PATCH] Update docs "Troubleshooting -> HTTPs and Redirects" section --- docs/troubleshooting.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 1626d9e..3ecb3f4 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -6,7 +6,13 @@ If you work on linux and cannot edit some of the project files right after the f ## 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). ## TLS/HTTPS Issues