1

大家好,我刚刚部署了一个全栈 vuejs 并将应用程序表达到 heroku。这是我为 vue js 应用程序提供服务的后端代码。

if (process.env.NODE_ENV === "production") {
  app.use(express.static(__dirname + "/dist/"));
  app.get("*", (req, res) => {
    res.sendFile(__dirname + "/dist/index.html");
  });
}

当我访问我的应用程序并尝试登录时,我收到此错误。

内容安全策略:该页面的设置阻止了在 eval(“script-src”)中加载资源。

内容安全策略:页面设置阻止在 http://localhost:3000/api/v1/user/login(“default-src”)加载资源。xhr.js:177:12

有人可以帮我解决这个问题。谢谢

4

0 回答 0