public function isSecure() : bool
    {
        if ($this->isUsingTrustedProxy() && $this->server->has(self::$trustedHeaderNames[RequestHeaders::CLIENT_PROTO])) {
            $protoString = $this->server->get(self::$trustedHeaderNames[RequestHeaders::CLIENT_PROTO]);
            $protoArray = explode(',', $protoString);

            return count($protoArray) > 0 && in_array(strtolower($protoArray[0]), ['https', 'ssl', 'on']);
        }

        return $this->server->has('HTTPS') && $this->server->get('HTTPS') !== 'off';
    }
public function isSecure() : bool
    {
        if ($this->isUsingTrustedProxy() && $this->server->has(self::$trustedHeaderNames[RequestHeaders::CLIENT_PROTO])) {
            $protoString = $this->server->get(self::$trustedHeaderNames[RequestHeaders::CLIENT_PROTO]);
            $protoArray = explode(',', $protoString);

            return count($protoArray) > 0 && in_array(strtolower($protoArray[0]), ['https', 'ssl', 'on']);
        }

        return $this->server->has('HTTPS') && $this->server->get('HTTPS') !== 'off';
    }
public function isSecure ( ) : bool { if ( $ this -> isUsingTrustedProxy ( ) && $ this -> server -> has ( self :: $ trustedHeaderNames [ RequestHeaders :: CLIENT_PROTO ] ) ) { $ protoString = $ this -> server -> get ( self :: $ trustedHeaderNames [ RequestHeaders :: CLIENT_PROTO ] ) ; $ protoArray = explode ( ',' , $ protoString ) ; return count ( $ protoArray ) > 0 && in_array ( strtolower ( $ protoArray [ 0 ] ) , [ 'https' , 'ssl' , 'on' ] ) ; } return $ this -> server -> has ( 'HTTPS' ) && $ this -> server -> get ( 'HTTPS' ) !== 'off' ; }
Gets whether or not the request was made through HTTPS

@return bool True if the request is secure, otherwise false
Gets whether or not the request was made through HTTPS