每次我创建新的 sails 项目并尝试登录时,这个错误都会来帮助我解决这个问题

问题描述 投票:0回答:1

enter image description here

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
backend sails.js sails-mongo sails-postgresql sails.io.js
1个回答
0
投票

我也面临同样的情况

看起来 _csrf 没有从 Sails 核心发送回 window.SAILS_LOCALS,所以

我建议您暂时将 false csrf 属性设置到 config/security.js 文件中。

我的意思是 - 暂时 - 由于缺乏 CSRF 控制的安全问题。

© www.soinside.com 2019 - 2024. All rights reserved.