proxy.js 3.98 KB
Newer Older
1 2
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
邓晓峰's avatar
邓晓峰 committed
3
const proxyURL = 'http://192.168.12.47:8081';
邓晓峰's avatar
邓晓峰 committed
4
module.exports = {
5
  assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
邓晓峰's avatar
邓晓峰 committed
6 7
  dev: {
    '/CityInterface': {
8 9
      target: proxyURL,
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
10 11
      // target: 'http://192.168.19.102:8055',

12
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
13
      // target: 'http://192.168.10.150:8050',
邓晓峰's avatar
邓晓峰 committed
14
      // target: 'http://192.168.19.103:8112',
邓晓峰's avatar
邓晓峰 committed
15
      // target: 'http://192.168.12.8:8098',
邓晓峰's avatar
邓晓峰 committed
16
      // target: 'http://192.168.10.20:8888',
邓晓峰's avatar
邓晓峰 committed
17 18 19 20 21 22 23 24 25
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
26
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
27
      // target: 'http://192.168.10.150:8050',
28
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
29
      // target: 'http://192.168.19.102:8055',
邓晓峰's avatar
邓晓峰 committed
30
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
31
      // target: 'http://192.168.12.8:8098',
邓晓峰's avatar
邓晓峰 committed
32
      // target: 'http://192.168.10.20:8888',
邓晓峰's avatar
邓晓峰 committed
33 34 35
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
    '/cityjson': {
      target: 'https://pv.sohu.com',
      // target: 'http://192.168.19.102:8055',
      // target: 'https://panda-water.com',
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
    '/Publish': {
56
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
57 58
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
59
      // target: 'http://192.168.10.151:8055',
60
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
61
      // target: 'http://192.168.19.102:8055',
邓晓峰's avatar
邓晓峰 committed
62
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
63 64 65 66 67 68 69 70 71
      // target: 'http://192.168.10.150:8050',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Publish': '/Publish',
      },
    },
邓晓峰's avatar
邓晓峰 committed
72 73 74 75 76 77 78 79 80 81
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      },
    },
82 83
    '/CityTemp': {
      // target: 'http://192.168.10.150:8777',
邓晓峰's avatar
邓晓峰 committed
84
      target: proxyURL,
85 86 87 88 89 90 91 92
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityTemp': '/CityTemp',
      },
    },
93 94 95 96 97 98 99 100 101 102
    '/civweb4': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/civweb4': '/civweb4',
      },
    },
103 104 105 106 107 108 109
    '/web4': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
110
        'web4': 'web4',
111 112
      },
    }
邓晓峰's avatar
邓晓峰 committed
113
  },
114
  pre: {
邓晓峰's avatar
邓晓峰 committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
    '/CityInterface': {
      target: 'https://panda-water.cn',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
      target: 'https://panda-water.cn',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
130 131 132 133 134
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
邓晓峰's avatar
邓晓峰 committed
135 136 137 138 139 140 141 142 143 144
    '/cityjson': {
      target: 'https://pv.sohu.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
邓晓峰's avatar
邓晓峰 committed
145
    '/Publish': {
邓晓峰's avatar
邓晓峰 committed
146
      target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
147 148
      changeOrigin: true,
      headers: {
149
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
150 151
      },
      pathRewrite: {
152
        '/Publish': '/Publish',
邓晓峰's avatar
邓晓峰 committed
153
      },
154
    },
邓晓峰's avatar
邓晓峰 committed
155 156
  },
};