MasterX
MasterX

Reputation: 91

An insecure WebSocket connection while accessing Neo4J endpoint after deploying to Firebase

I've created an app using Neo4j, But I tried to host the app in Firebase I'm getting the below error

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.

Below is my code

  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();
  }

How can I fix this issue ?

Please help.

Upvotes: 0

Views: 551

Answers (1)

Michael Hunger
Michael Hunger

Reputation: 41706

You either have to pass encryption:false or your have to provide certificates for your Neo4j server.

see: https://neo4j.com/developer/javascript/#driver-configuration

Upvotes: 1

Related Questions