【问题标题】:Sails.js: Route Experiencing 'Too Many Requests' Error In ChromeSails.js:路由在 Chrome 中遇到“请求过多”错误
【发布时间】:2013-03-15 11:31:59
【问题描述】:

所以我正在使用新的节点 MVC 框架 Sails.js (https://github.com/balderdashy/sails),我遇到了一个以前从未遇到过的奇怪错误。我正在尝试实施示例 passport.js 身份验证策略 (https://gist.github.com/theangryangel/5060446) Sails.js 包含在文档中,但是当我尝试在未登录的情况下访问我的主页 (http://localhost:1337/) 时,我被路由到 http://localhost:1337/login但它没有加载,chrome 给了我这个错误:

This webpage has a redirect loop
The webpage at http://localhost:1337/login has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this webpage later.
Learn more about this problem.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

有人知道怎么回事吗?

【问题讨论】:

  • 我完全不知道 Sails ,但是如果 authenticated 策略也适用于 /login,您可能会遇到重定向循环。跨度>
  • 在sails 1版本中遇到类似的事情,这个问题的解决方案是什么?

标签: javascript node.js sails.js


【解决方案1】:

看起来该消息来自 Passport。如果您愿意,请加入 IRC (#sailsjs),我们可以看看。同时,@robertklep 的建议对我来说似乎很有可能。

【讨论】:

    猜你喜欢
    • 2014-03-06
    • 1970-01-01
    • 2015-12-12
    • 2019-02-08
    • 2019-01-23
    • 2015-12-17
    • 2014-12-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多