2013-03-25 48 views
2

因此,我正在使用新節點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,但它不會加載和鉻給我這個錯誤:Sails.js:在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. 

有誰知道發生了什麼事?

+1

我根本不知道Sails *,但是如果'authenticated'策略也會應用到'/ login',你可能會得到一個重定向循環。 – robertklep 2013-03-25 21:21:45

回答

0

看起來像是來自Passport的消息。如果你願意,可以跳入IRC(#sailsjs),我們可以看一看。與此同時,@ robertklep的建議對我來說似乎是一個很大的可能性。

相關問題