【问题标题】:How to Resolve Cors issue in chrome?如何解决 Chrome 中的 Cors 问题?
【发布时间】:2021-04-07 09:32:21
【问题描述】:

我开发了一个网站,并且我托管了 Google firebase 托管。该网站在某些国家/地区运行良好,例如(印度、中国、荷兰)。

当我在阿联酋国家/地区访问同一网站时。我收到错误please check this link

我还添加了一些 Cors 扩展。但没有用。我使用了 firebase auth 功能。

【问题讨论】:

    标签: javascript firebase firebase-authentication firebase-hosting


    【解决方案1】:

    如果你使用 express,你可以试试这个:

    const app = express();
    const cors = require('cors');
    app.use(cors({ origin: true }));
    

    其中 app 是您的 express 函数的名称。

    【讨论】:

      猜你喜欢
      • 2015-10-02
      • 2021-09-06
      • 2016-11-24
      • 2019-12-07
      • 2021-02-17
      • 1970-01-01
      • 2012-05-24
      • 1970-01-01
      • 2019-12-29
      相关资源
      最近更新 更多