【问题标题】:Establish DDP connection over SSL to Meteor app通过 SSL 与 Meteor 应用建立 DDP 连接
【发布时间】:2014-11-25 11:44:36
【问题描述】:

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

【问题讨论】:

    标签: ssl meteor ddp


    【解决方案1】:

    SockJs 上的 Meteor 中继,根据 SocksJs README: 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");
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-29
      • 2017-08-02
      • 2013-11-08
      • 2017-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多