对于某些客户端功能,我需要在Meteor网站上实现HTTPS。

我将Tarang:ssl软件包安装到Meteor中,我有3个文件:

private/ca.pem
private/cert.pem
private/key.pem


我当前的Meteor配置设置如下:

Meteor.startup(function () {
    SSLProxy({
       port: 443,
       ssl : {
            key: Assets.getText("key.pem"),
            cert: Assets.getText("cert.pem"),
            ca: Assets.getText("ca.pem")
       }
    });
    ....
}


我的Meteor服务器启动如下:

sudo meteor run --port 80 --allow-superuser


我做错了什么还是忘记了什么?

最佳答案

我将本地HTTPS端口设置为3100以绕过443 sudo要求。我用--port 3100运行流星,它对我有用。另外,我仅在key中设置certSSLProxy({})

10-07 12:40
查看更多