proxy.js 6.11 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 = 'https://work.panda-water.cn';
lihonglin's avatar
lihonglin committed
4
const proxyURL = 'http://192.168.12.3:8082';
5 6
// const proxyURL = 'https://panda-water.cn'

邓晓峰's avatar
邓晓峰 committed
7
module.exports = {
8
  assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
9
  development: {
10 11 12 13 14 15 16 17 18 19
    '/PandaOMS':{
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaOMS': '/PandaOMS',
      },
    },
20
    '/PandaGIS': {
21 22 23 24 25 26
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
27
        '/PandaGIS': '/PandaGIS',
28 29
      },
    },
30
    '/PandaWater':{
31 32 33 34 35 36
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
37
        '/PandaWater': '/PandaWater',
38 39
      },
    },
邓晓峰's avatar
邓晓峰 committed
40
    '/CityInterface': {
41 42
      target: proxyURL,
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
43 44
      // target: 'http://192.168.19.102:8055',

45
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
46
      // target: 'http://192.168.10.150:8050',
邓晓峰's avatar
邓晓峰 committed
47
      // target: 'http://192.168.19.103:8112',
邓晓峰's avatar
邓晓峰 committed
48
      // target: 'http://192.168.12.8:8098',
邓晓峰's avatar
邓晓峰 committed
49
      // target: 'http://192.168.10.20:8888',
邓晓峰's avatar
邓晓峰 committed
50 51 52 53 54 55 56 57 58
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
59
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
60
      // target: 'http://192.168.10.150:8050',
61
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
62
      // target: 'http://192.168.19.102:8055',
邓晓峰's avatar
邓晓峰 committed
63
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
64
      // target: 'http://192.168.12.8:8098',
邓晓峰's avatar
邓晓峰 committed
65
      // target: 'http://192.168.10.20:8888',
邓晓峰's avatar
邓晓峰 committed
66 67 68
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
69 70 71 72 73
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
74 75 76 77 78 79 80 81 82 83
    '/Cityinterface': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Cityinterface': '/CityInterface',
      },
    },
邓晓峰's avatar
邓晓峰 committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
    '/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': {
99
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
100 101
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
102
      // target: 'http://192.168.10.151:8055',
103
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
104
      // target: 'http://192.168.19.102:8055',
邓晓峰's avatar
邓晓峰 committed
105
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
106 107 108 109 110 111 112 113 114
      // target: 'http://192.168.10.150:8050',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Publish': '/Publish',
      },
    },
邓晓峰's avatar
邓晓峰 committed
115 116 117 118 119 120 121 122 123 124
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      },
    },
125 126 127 128
    '/PandaInformatization': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
129
        'Access-Control-Allow-Origin': '*',
130 131
      },
      pathRewrite: {
132
        '/PandaInformatization': '/PandaInformatization',
133
      },
134 135
    },
    '/PandaWorkFlow': {
136 137 138
      target: proxyURL,
      changeOrigin: true,
      headers: {
139
        'Access-Control-Allow-Origin': '*',
140 141
      },
      pathRewrite: {
142
        '/PandaWorkFlow': '/PandaWorkFlow',
143
      },
144
    },
145 146
    '/CityTemp': {
      // target: 'http://192.168.10.150:8777',
邓晓峰's avatar
邓晓峰 committed
147
      target: proxyURL,
148 149 150 151 152 153 154 155
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityTemp': '/CityTemp',
      },
    },
156 157 158 159 160 161 162 163 164 165
    '/civweb4': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/civweb4': '/civweb4',
      },
    },
166
    '/web4': {
167
      target: "https://panda-water.cn",
168 169 170 171 172
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
173
        'web4': 'web4',
174
      },
175 176 177 178 179 180 181 182
    },
    '/areas_v3': {
      target: 'https://geo.datav.aliyun.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
    },
邓晓峰's avatar
邓晓峰 committed
183
  },
184
  pre: {
185
    '/PandaGIS': {
186 187 188 189 190 191
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
192
        '/PandaGIS': '/PandaGIS',
193 194
      },
    },
邓晓峰's avatar
邓晓峰 committed
195
    '/CityInterface': {
196
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
197 198 199 200 201 202 203 204 205
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
206
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
207 208 209
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
210 211 212 213 214
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
邓晓峰's avatar
邓晓峰 committed
215 216 217 218 219 220 221 222 223 224
    '/cityjson': {
      target: 'https://pv.sohu.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
225 226 227 228 229 230 231 232 233 234
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      }
    },
邓晓峰's avatar
邓晓峰 committed
235
    '/Publish': {
邓晓峰's avatar
邓晓峰 committed
236
      target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
237 238
      changeOrigin: true,
      headers: {
239
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
240 241
      },
      pathRewrite: {
242
        '/Publish': '/Publish',
邓晓峰's avatar
邓晓峰 committed
243
      },
244
    },
245 246 247 248 249 250 251
    '/areas_v3': {
      target: 'https://geo.datav.aliyun.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
    },
邓晓峰's avatar
邓晓峰 committed
252
  },
253
}