CloudError: Endpoint (`observeMySession`) responded with an error (or the request failed).
我需要修复此错误,这是我的浏览器控制台错误,当我在 sails lift 命令之后尝试登录到新 sails 项目时出现这些错误
js console browser - account-notification-banner.component.js:55 Uncaught (in promise) CloudError: Endpoint (`observeMySession`) responded with an error (or the request failed).
at Object.exec (http://localhost:1337/dependencies/cloud.js:649:33)
at http://localhost:1337/dependencies/cloud.js:612:26
at new Promise (<anonymous>)
at Object.toPromise (http://localhost:1337/dependencies/cloud.js:610:24)
at Object.then (http://localhost:1337/dependencies/cloud.js:592:36)
Error Summary:
(see `.responseInfo` for more details)
·-------------·----------------------------------------·
| Protocol | ws(s):// (io.socket)
| Address | POST http://localhost:1337/api/v1/observe-my-session
| Exit | error
| Status Code | 403
·-------------·----------------------------------------·
Response Body:
Forbidden
我也面临同样的情况
看起来 _csrf 没有从 Sails 核心发送回 window.SAILS_LOCALS,所以
我建议您暂时将 false csrf 属性设置到 config/security.js 文件中。
我的意思是 - 暂时 - 由于缺乏 CSRF 控制的安全问题。