重定向位置 'about:blank' 具有不允许的跨源请求方案

Redirect location 'about:blank' has a disallowed scheme for cross-origin requests

我正在尝试在 React 组件中使用 axios 访问 facebooks 图 API。

当组件安装时,我得到我的 facebook 访问令牌并调用 axios .get(`https://graph.facebook.com/me/friendsaccess_token=${token}&fields=name,id,picture`) .then(result => this.setState({ friends: result.data.data })) .catch(error => console.log(error))

它用于开发。

我将应用程序部署到 firebase,它可以在我的计算机上运行。如果我在其他人的计算机上尝试,我会在控制台中收到以下错误。

Failed to load https://graph.facebook.com/me/friends?access_token={token}&fields=name,id,picture: Redirect from 'https://graph.facebook.com/me/friends?access_token={token}&fields=name,id,picture' has been blocked by CORS policy: Redirect location 'about:blank' has a disallowed scheme for cross-origin requests.

我似乎找不到任何关于 CORS 重定向位置 'about:blank' 的文档。有谁知道这意味着什么或我该如何解决它?

这是一个 chrome 扩展冲突问题。问题只发生在 ion chrome 上,禁用的扩展解决了这个问题。检查您的扩展程序。