How does webpack-dev-server solve cross-domain requests! !

  node.js, question

1. LoaclHost: 8080 Web Pack-Dev-Server Local Server, the interface request address is api.xxx.com, and now it is impossible to request the interface on the remote server locally.

XMLHttpRequest cannot load  http://api.xxx.com/v1/f/shares.
 No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 403.

I have looked for relevant information. Is it wrong or what doesn’t work if the configuration is not made?

entry:[
 'webpack/hot/only-dev-server',
 './src/main.js'
 ],
 devServer: {
 hot: true,
 inline: true,
 proxy: {
 '*': {
 target: 'localhost:8080',
 host:'http://m.xxx.com',
 secure: false,
 bracket
 bracket
 },
changeOrigin: true
 target:  http://api.xxx.com

ThenChange to your local reference address, such as /api/
When calling from other places, write ajax(‘/api/xxx’), etc