部署到Firebase后访问Neo4J端点时不安全的WebSocket连接

问题描述 投票:0回答:1

[我已经使用Neo4j创建了一个应用程序,但是我试图在Firebase中托管该应用程序,但出现以下错误

was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://ec2-18-140-45-111.ap-southeast-1.compute.amazonaws.com:7687/'. This request has been blocked; this endpoint must be available over WSS.

下面是我的代码

  draw() {
    const config = {
      container_id: "viz",
      server_url: "bolt://ec2-18-140-45-111.ap-southeast-1.compute.amazonaws.com:7687",
      server_user: "neo4j",
      server_password: "Password",
      labels: {
      },
      relationships: {
      },
      initial_cypher: "QUery",
      arrows: true
    }
    this.viz = new NeoVis.default(config);
    this.viz.render();
  }

如何解决此问题?

请帮助。

angular typescript firebase neo4j wss
1个回答
0
投票

您要么必须通过加密:false,要么必须为Neo4j服务器提供证书。

请参阅:https://neo4j.com/developer/javascript/#driver-configuration

© www.soinside.com 2019 - 2024. All rights reserved.