【发布时间】:2015-06-22 19:39:18
【问题描述】:
我可以“密码保护”我的整个 Meteor 应用程序,比如 PHP 中的“htaccess”吗?
例如:我不希望公众访问我的网站,但客户希望看到它。
【问题讨论】:
标签: meteor password-protection
我可以“密码保护”我的整个 Meteor 应用程序,比如 PHP 中的“htaccess”吗?
例如:我不希望公众访问我的网站,但客户希望看到它。
【问题讨论】:
标签: meteor password-protection
不知道这是答案。谷歌第一个命中。 https://github.com/Jabbslad/basic-auth
编辑:
其实很简单。
添加包。
meteor add jabbslad:basic-auth
在服务器端代码中添加此代码
var basicAuth = new HttpBasicAuth("guest", "password");
basicAuth.protect();
您可以在存储库 readme.md 中看到更多选项
【讨论】: