Make WordPress Core

Ticket #40710: is_ssl_proto.diff

File is_ssl_proto.diff, 565 bytes (added by lriaudel, 9 years ago)

function is_ssl

  • wp-includes/load.php

    diff --git wp-includes/load.php wp-includes/load.php
    index 2b375b3..8993cee 100644
    function is_ssl() { 
    969969                if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {
    970970                        return true;
    971971                }
    972 
    973972                if ( '1' == $_SERVER['HTTPS'] ) {
    974973                        return true;
    975974                }
    976975        } elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
    977976                return true;
    978977        }
     978        elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] )
     979                return true;
     980        }
    979981        return false;
    980982}
    981983