public static function _isSSL() {
        // Check if SSL is enabled
        if (isset($_SERVER) && (isset($_SERVER['HTTPS']) && $_SERVER["HTTPS"] == "on") || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https") ) {
            return TRUE;
        }
        return FALSE;
    }