devServer: {
port: 8086,
historyApiFallback: {
index: ‘/dist/index.html’
},
proxy : {
’/txypassport’ :{
target: ‘http://127.0.0.1:8088’,
changeOrigin : true
},
’/txyuser’ :{
target: ‘http://127.0.0.1:8088’,
changeOrigin : true
},
’/txyryzl’ :{
target: ‘http://127.0.0.1:8088’,
changeOrigin : true
},
’/txybm’ :{
target: ‘http://127.0.0.1:8088’,
changeOrigin : true
},
’/txyart’ :{
target: ‘http://127.0.0.1:8088’,
changeOrigin : true
}
}
}
老师 因为后端还不能放到远程服务器,这样的调试出现问题。
Invalid CORS request
Request URL: http://localhost:8086/txypassport/login
Request Method: POST
Status Code: 403 Forbidden
Remote Address: 127.0.0.1:8086
Referrer Policy: no-referrer-when-downgrade