proxy.js 6.36 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';
4
 const proxyURL = 'http://192.168.10.182:8099/';
5
// const proxyURL = 'https://panda-water.cn'
程恺文's avatar
程恺文 committed
6
//const proxyURL = 'http://192.168.12.189:8816/'
邓晓峰'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',
      },
    },
84 85 86 87 88 89 90 91 92 93
    '/center': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/center': '/center',
      },
    },
邓晓峰's avatar
邓晓峰 committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
    '/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': {
109
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
110 111
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
112
      // target: 'http://192.168.10.151:8055',
113
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
114
      // target: 'http://192.168.19.102:8055',
邓晓峰's avatar
邓晓峰 committed
115
      // target: 'https://panda-water.com',
邓晓峰's avatar
邓晓峰 committed
116 117 118 119 120 121 122 123 124
      // target: 'http://192.168.10.150:8050',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Publish': '/Publish',
      },
    },
邓晓峰's avatar
邓晓峰 committed
125 126 127 128 129 130 131 132 133 134
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      },
    },
135 136 137 138
    '/PandaInformatization': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
139
        'Access-Control-Allow-Origin': '*',
140 141
      },
      pathRewrite: {
142
        '/PandaInformatization': '/PandaInformatization',
143
      },
144 145
    },
    '/PandaWorkFlow': {
146 147 148
      target: proxyURL,
      changeOrigin: true,
      headers: {
149
        'Access-Control-Allow-Origin': '*',
150 151
      },
      pathRewrite: {
152
        '/PandaWorkFlow': '/PandaWorkFlow',
153
      },
154
    },
155 156
    '/CityTemp': {
      // target: 'http://192.168.10.150:8777',
邓晓峰's avatar
邓晓峰 committed
157
      target: proxyURL,
158 159 160 161 162 163 164 165
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityTemp': '/CityTemp',
      },
    },
166 167 168 169 170 171 172 173 174 175
    '/civweb4': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/civweb4': '/civweb4',
      },
    },
176
    '/web4': {
177
      target: "https://panda-water.cn",
178 179 180 181 182
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
183
        'web4': 'web4',
184
      },
185 186 187 188 189 190 191 192
    },
    '/areas_v3': {
      target: 'https://geo.datav.aliyun.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
    },
邓晓峰's avatar
邓晓峰 committed
193
  },
194
  pre: {
195
    '/PandaGIS': {
196 197 198 199 200 201
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
202
        '/PandaGIS': '/PandaGIS',
203 204
      },
    },
邓晓峰's avatar
邓晓峰 committed
205
    '/CityInterface': {
206
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
207 208 209 210 211 212 213 214 215
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
216
      target: proxyURL,
邓晓峰's avatar
邓晓峰 committed
217 218 219
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
220 221 222 223 224
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
邓晓峰's avatar
邓晓峰 committed
225 226 227 228 229 230 231 232 233 234
    '/cityjson': {
      target: 'https://pv.sohu.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
235 236 237 238 239 240 241 242 243 244
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      }
    },
邓晓峰's avatar
邓晓峰 committed
245
    '/Publish': {
邓晓峰's avatar
邓晓峰 committed
246
      target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
247 248
      changeOrigin: true,
      headers: {
249
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
250 251
      },
      pathRewrite: {
252
        '/Publish': '/Publish',
邓晓峰's avatar
邓晓峰 committed
253
      },
254
    },
255 256 257 258 259 260 261
    '/areas_v3': {
      target: 'https://geo.datav.aliyun.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
    },
邓晓峰's avatar
邓晓峰 committed
262
  },
263
}