📌  相关文章
📜  CORS 策略已阻止访问 XMLHttpRequest - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:20.549000             🧑  作者: Mango

代码示例6
app.use(function (request, response, next) {
  response.header("Access-Control-Allow-Origin", "*");
  response.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});