【问题标题】:Meteor Password Protect complete Application流星密码保护完整的应用程序
【发布时间】:2015-06-22 19:39:18
【问题描述】:

我可以“密码保护”我的整个 Meteor 应用程序,比如 PHP 中的“htaccess”吗?

例如:我不希望公众访问我的网站,但客户希望看到它。

【问题讨论】:

    标签: meteor password-protection


    【解决方案1】:

    不知道这是答案。谷歌第一个命中。 https://github.com/Jabbslad/basic-auth

    编辑:

    其实很简单。

    添加包。

    meteor add jabbslad:basic-auth
    

    在服务器端代码中添加此代码

    var basicAuth = new HttpBasicAuth("guest", "password");
    basicAuth.protect();
    

    您可以在存储库 readme.md 中看到更多选项

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-09
      • 2011-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多