SimpleSAML\Utils\HTTP::getServerHTTPS PHP 메소드

getServerHTTPS() 개인적인 정적인 메소드

Retrieve HTTPS status from $_SERVER environment variables.
저자: Olav Morken, UNINETT AS ([email protected])
private static getServerHTTPS ( ) : boolean
리턴 boolean True if the request was performed through HTTPS, false otherwise.
    private static function getServerHTTPS()
    {
        if (!array_key_exists('HTTPS', $_SERVER)) {
            // not an https-request
            return false;
        }
        if ($_SERVER['HTTPS'] === 'off') {
            // IIS with HTTPS off
            return false;
        }
        // otherwise, HTTPS will be a non-empty string
        return $_SERVER['HTTPS'] !== '';
    }