angular - 部署到 Firebase 后访问 Neo4J 端点时出现不安全的 WebSocket 连接
问题描述
我使用 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();
}
我该如何解决这个问题?
请帮忙。
解决方案
您要么必须通过 encryption:false 要么必须为 Neo4j 服务器提供证书。
见:https ://neo4j.com/developer/javascript/#driver-configuration
推荐阅读
- node.js - 如何从不同的文件访问 rascal.js 发布?
- python - 周期性数据的核密度估计
- php - Quickpay API回调:未定义索引:HTTP_QUICKPAY_CHECKSUM_SHA256
- alpine - Alpine 提供哪些版本稳定性保证(如果有)?
- php - 如何将值设置为
- python - 这些 Big-O 符号对于简单的循环函数 (Python) 是否正确?
- php - Laravel 主线程被阻塞
- python - 如何从集合中的(x,y)坐标返回x值
- xamarin - 如何防止 Xamarin Forms webview“网页不可用”页面
- go - 戈朗 | unix.setns(FD,CLONE_NEWNS) 因“无效参数”而失败