vue配置请求本地接口

proxy: {
      '/nrms': {
        target: 'http://localhost:8921/',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/nrms': '/'
        }
      },
      '/': {
        target: 'http://192.168.31.84/',
        changeOrigin: true,
        ws: false
      },

    }

  比如本地运行,nrms服务,可增加配置项,nrms服务使用本地的

posted @ 2023-05-06 17:35  庞某人  阅读(145)  评论(0编辑  收藏  举报