3

当 Meteor 客户端用于DDP.connect()连接 DDP 服务器时,它以明文形式发送。我们如何建立 SSL 加密的 DDP 连接?

4

1 回答 1

0

根据SocksJs README ,Meteor 在 SockJs 上中继:From SockJS' point of view there is nothing special about SSL/HTTPS. Connecting between unencrypted and encrypted sites should work just fine.

我的代码:

var connection = DDP.connect("ws://127.0.0.1:3000");

如果你切换wswss(WebSocket Secure),如果主机支持ssl,就会被使用。在我的本地主机中,我没有安装 ssl 并且它不会回退到“ws”,如果需要,您必须手动对其进行编码。

于 2014-11-25T03:44:36.077 回答