Skip to content

解决前端http请求跨域的问题

Zobor edited this page Sep 24, 2020 · 2 revisions

bproxy.config.js

const config = {
  https: [],
  port: 8888,
  host: [],
};
config.rules = [{
  regx: 'http://qq.com/test',
  responseHeaders: {
    "Access-Control-Allow-Origin": "http://v.qq.com",
    "Access-Control-Allow-Credentials": "true",
  },
}];
module.exports = config;
Clone this wiki locally