proxy.js 6.19 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.12.3:8082';
程恺文's avatar
程恺文 committed
5 6
//const proxyURL = 'https://panda-water.cn/'
const proxyURL = 'http://192.168.10.152:60001'
邓晓峰'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 186

    '/PandaGIS': {
187 188 189 190 191 192
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
193
        '/PandaGIS': '/PandaGIS',
194 195
      },
    },
邓晓峰's avatar
邓晓峰 committed
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
    '/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
211 212 213 214 215
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
邓晓峰's avatar
邓晓峰 committed
216 217 218 219 220 221 222 223 224 225
    '/cityjson': {
      target: 'https://pv.sohu.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
226 227 228 229 230 231 232 233 234 235
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      }
    },
邓晓峰's avatar
邓晓峰 committed
236
    '/Publish': {
邓晓峰's avatar
邓晓峰 committed
237
      target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
238 239
      changeOrigin: true,
      headers: {
240
        'Access-Control-Allow-Origin': '*',
邓晓峰's avatar
邓晓峰 committed
241 242
      },
      pathRewrite: {
243
        '/Publish': '/Publish',
邓晓峰's avatar
邓晓峰 committed
244
      },
245
    },
246 247 248 249 250 251 252
    '/areas_v3': {
      target: 'https://geo.datav.aliyun.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
    },
邓晓峰's avatar
邓晓峰 committed
253
  },
254
}