【发布时间】:2019-03-05 23:05:00
【问题描述】:
我正在开发一个 React 应用,在尝试使用他们的电子邮件身份验证提供商登录 Firebase 时出现此错误。
Failed to load https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=.....:
Response to preflight request doesn't pass access control check: The
'Access-Control-Allow-Origin' header has a value 'https://localhost:3000'
that is not equal to the supplied origin. Origin 'http://localhost:3000'
is therefore not allowed access.
(注意第 3 行的 https 与第 4 行的 http)
看起来他们将 Access-Control-Allow-Origin 从 * 更改为您所调用的任何域的 https 版本?
这是否意味着我现在需要将我的 React 应用程序配置为以 https://localhost:3000 运行?
【问题讨论】:
标签: firebase cors firebase-authentication cross-domain