Though using a valid SSL certificate some web servers don't return a value for $_SERVER['HTTPS'] and also $_SERVER['SERVER_PORT'] stays on 80 - but rather use $_SERVER['SSL'] values (string) 0 | 1.
Therefore, could support for this be added? Perhaps like that:
`
function is_ssl() {
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
return true;
}<strong>
elseif ( isset($_SERVER['SSL']) && ( '1' == $_SERVER['SSL'] ) ) {
return true;
}</strong>
return false;
}
`