guhongwei před 4 roky
rodič
revize
19584426b0
1 změnil soubory, kde provedl 14 přidání a 7 odebrání
  1. 14 7
      vue.config.js

+ 14 - 7
vue.config.js

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