WordPress.org

Ready to get started?Download WordPress

Ideas

Small addition for function is_ssl() - wp-includes::functions.php

  1. nwsolutions
    Member

    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;
    }
    `

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    3 Votes
  • Status

    This idea is under consideration