guhongwei 4 years ago
parent
commit
19584426b0
1 changed files with 14 additions and 7 deletions
  1. 14 7
      vue.config.js

+ 14 - 7
vue.config.js

@@ -20,22 +20,29 @@ module.exports = {
     port: '8001',
     port: '8001',
     //api地址前缀
     //api地址前缀
     proxy: {
     proxy: {
-      '/weixin': {
+      '/api': {
         target: 'http://smart.cc-lotus.info',
         target: 'http://smart.cc-lotus.info',
-        changeOrigin: true,
         ws: true,
         ws: true,
+        onProxyReq(proxyReq, req, res) {
+          proxyReq.setHeader('x-tenant', 'master');
+        },
       },
       },
       '/files': {
       '/files': {
-        target: 'https://zb.liaoningdoupo.com',
+        target: 'http://smart.cc-lotus.info',
+        changeOrigin: true,
+        ws: true,
       },
       },
-      '/api': {
-        target: 'https://zb.liaoningdoupo.com',
+      '/weixin': {
+        target: 'http://smart.cc-lotus.info',
         changeOrigin: true,
         changeOrigin: true,
         ws: true,
         ws: true,
       },
       },
-      '/ws': {
-        target: 'https://zb.liaoningdoupo.com',
+      '/test': {
+        target: 'http://10.16.11.186:8103',
         ws: true,
         ws: true,
+        pathRewrite: {
+          '^/test': '/api',
+        },
       },
       },
     },
     },
   },
   },