Do secure redirect only for admin destinations. see #7561

git-svn-id: https://develop.svn.wordpress.org/trunk@8730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-08-25 20:40:34 +00:00
parent b5f62016f5
commit 00e2cd0917
2 changed files with 3 additions and 3 deletions

View File

@@ -693,7 +693,7 @@ function auth_redirect() {
$secure = false;
// If https is required and request is http, redirect
if ( $secure && !is_ssl() ) {
if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));
exit();
@@ -705,7 +705,7 @@ function auth_redirect() {
if ( $user_id = wp_validate_auth_cookie() ) {
// If the user wants ssl but the session is not ssl, redirect.
if ( !$secure && get_user_option('use_ssl', $user_id) ) {
if ( !$secure && get_user_option('use_ssl', $user_id) && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));
exit();