使用 Meteor,useraccounts-core ensureSignedIn 插件不会使用 '/' 路由

Using Meteor, useraccounts-core ensureSignedIn plugin won't except '/' route

我正在尝试在所有路径上使用 ensureSignedIn 插件,但前 'home' 页面除外,该页面具有用于登录网站的不同部分的按钮。

这是我前往 'home' 的路线:

Router.route('/', function () {
  this.render('home');
});

这是插件和例外行:

Router.plugin('ensureSignedIn', {
  except: ['home', 'atSignIn', 'atSignUp', 'atForgotPassword']
});

两个片段都来自我的 lib/routes.js 文件,如果有区别的话。 我已经尝试在 except: 部分中添加不同的路由名称,并且它们被正确地排除在外,但我终生无法让 'home' 路由不显示 "Must be logged in"。

我用谷歌搜索并通读了 gitHub 个问题,但没有看到其他人遇到过这个问题,所以这可能是我做错了什么,而不是用户帐户或 iron-router 的错误。

/ 路由的名称设置为 root,然后将该路由名称添加到 ensureSignedIn 设置中:

Router.route('/', {
    name: 'root',
    template: 'home',
    action: function() {
        this.render();
    }
});

Router.plugin('ensureSignedIn', {
  except: ['root', 'atSignIn', 'atSignUp', 'atForgotPassword', 'atResetPwd']
});