From cd27d6e7f1bb2dfd8807114986ef58aa36da5121 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Wed, 4 Nov 2026 00:07:21 +0100 Subject: [PATCH] Furthermore improve reverse proxy security --- api/config/config-prod.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/config/config-prod.php b/api/config/config-prod.php index bb67d88..5e6068d 100644 --- a/api/config/config-prod.php +++ b/api/config/config-prod.php @@ -4,8 +4,10 @@ declare(strict_types=1); return [ 'components' => [ 'request' => [ + // Only the client's IP and protocol are trusted from proxies. + // The host is always taken from the Host header. 'trustedHosts' => [ - 'private', + 'private' => ['X-Forwarded-For', 'X-Forwarded-Proto'], ], ], ],