Merge pull request #4406 from maxrice/master
Fix HTTP_X_FORWARDED_HOST notice
This commit is contained in:
commit
aeeac6f5a3
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue