Merge pull request #4406 from maxrice/master

Fix HTTP_X_FORWARDED_HOST notice
This commit is contained in:
Mike Jolley 2013-12-23 05:12:28 -08:00
commit aeeac6f5a3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}