From 7b4ff1ee82ee810eca949222457e68588c41d965 Mon Sep 17 00:00:00 2001 From: Max Rice Date: Fri, 20 Dec 2013 14:03:55 -0500 Subject: [PATCH] Fix HTTP_X_FORWARDED_HOST notice --- includes/class-wc-https.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-https.php b/includes/class-wc-https.php index 5eaa3b0fe6d..6f03ff8d903 100644 --- a/includes/class-wc-https.php +++ b/includes/class-wc-https.php @@ -75,7 +75,7 @@ class WC_HTTPS { wp_safe_redirect( preg_replace( '|^http://|', 'https://', $_SERVER['REQUEST_URI'] ) ); exit; } else { - wp_safe_redirect( 'https://' . ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + wp_safe_redirect( 'https://' . ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'] ); exit; } } @@ -91,7 +91,7 @@ class WC_HTTPS { wp_safe_redirect( preg_replace( '|^https://|', 'http://', $_SERVER['REQUEST_URI'] ) ); exit; } else { - wp_safe_redirect( 'http://' . ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + wp_safe_redirect( 'http://' . ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'] ); exit; } }