From 0c4d840e2528b339de8647b356da0af26d9c99f7 Mon Sep 17 00:00:00 2001 From: Ralf Leifel <39068512+wv-leifel@users.noreply.github.com> Date: Sat, 5 Oct 2024 14:19:26 +0200 Subject: [PATCH] Fix forwarded host determination Use X-Forwarded-Host if set instead of X-Forwarded-Server to match domain, see https://github.com/yakamara/redaxo_yrewrite/issues/552 --- lib/yrewrite/yrewrite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/yrewrite/yrewrite.php b/lib/yrewrite/yrewrite.php index 6bbfee7..764dfd2 100644 --- a/lib/yrewrite/yrewrite.php +++ b/lib/yrewrite/yrewrite.php @@ -583,8 +583,8 @@ public static function getFullPath($link = '') public static function getHost() { - if (isset($_SERVER['HTTP_X_FORWARDED_SERVER'])) { - return $_SERVER['HTTP_X_FORWARDED_SERVER']; + if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { + return $_SERVER['HTTP_X_FORWARDED_HOST']; } return @$_SERVER['HTTP_HOST']; }