vue.config.js 321 B

123456789101112131415
  1. module.exports = {
  2. devServer: {
  3. proxy: {
  4. // 配置跨域
  5. '/apis': {
  6. target: 'http://api.veterans.dazesoft.cn/api',
  7. ws: false,
  8. changOrigin: true, //允许跨域
  9. pathRewrite: {
  10. '^/apis': '' //请求的时候使用这个api就可以
  11. }
  12. }
  13. }
  14. }
  15. };