vue项目做本地代理

在config里的index.js 的proxyTable里面配置格式为

dev: {

    // Paths
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    //做本地代理
    proxyTable: {
      '/doctor_sys_api': {
        target: 'http://47.102.194.98:8080/doctor_sys_api',
        changeOrigin: true,
        pathRewrite: {
          '^/doctor_sys_api': ''
        }
      },
    },

vue项目做本地代理_第1张图片
详情参考 https://blog.csdn.net/qq_36772866/article/details/85795111

你可能感兴趣的:(vue2.0)