Ticket #36451: moha-36451.diff
File moha-36451.diff, 686 bytes (added by , 8 years ago) |
---|
-
wp-includes/rest-api.php
319 319 } 320 320 321 321 if ( is_ssl() ) { 322 $http_host = $_SERVER['SERVER_NAME']; 323 if ( isset( $_SERVER['HTTP_HOST'] ) ) { 324 $http_host = $_SERVER['HTTP_HOST']; 325 } 322 326 // If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS. 323 if ( $ _SERVER['SERVER_NAME']=== parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) {327 if ( $http_host === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) { 324 328 $url = set_url_scheme( $url, 'https' ); 325 329 } 326 330 }