How to solve cross-domain problems vue

Development Environment:
Configuration config file folder index.js:
proxyTable: {
'/ API': {
target: 'http://10.10.1.242:8245',// rear end address
// secure: false, // if https is the interface need to configure this parameter
changeOrigin: to true,
pathRewrite: {
'^ / API': ''
}
}
}
HTML page access interface:
Export function getTest (the params) {
return POST ( `/ API / Tbk / dg_optimus_material`, the params);
}
production: installation configuration nginx

Guess you like

Origin www.cnblogs.com/xlfdqf/p/11128053.html