king
2020-06-05 24f0ce147c8daef39ec437d5def9d089ea5b1839
src/setupProxy.js
@@ -1,6 +1,8 @@
const proxy = require('http-proxy-middleware')
const host = 'http://qingqiumarket.cn'
const service = 'mkwms/'
// const host = 'http://cloud.mk9h.cn'
// const service = ''
module.exports = function(app) {
  app.use(proxy('/webapi', { 
@@ -22,7 +24,7 @@
    }
  }))
  app.use(proxy('/Upload', { // 登录接口
  app.use(proxy('/Upload', {
    target: `${host}/${service}zh-CN/Home/Upload`,
    secure: false,
    changeOrigin: true,
@@ -31,12 +33,12 @@
    }
  }))
  app.use(proxy('/local', {
    target: 'http://127.0.0.1:8888',
    secure: false,
    changeOrigin: true,
    pathRewrite: {
    '^/local': '/'
    }
  }))
  // app.use(proxy('/local', {
  //   target: 'http://127.0.0.1:8888',
  //   secure: false,
  //   changeOrigin: true,
  //   pathRewrite: {
  //   '^/local': '/'
  //   }
  // }))
}