proxy.js 4.46 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.101:8123';
邓晓峰's avatar
邓晓峰 committed
4

邓晓峰's avatar
邓晓峰 committed
5
module.exports = {
6
  assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
邓晓峰's avatar
邓晓峰 committed
7 8
  dev: {
    '/CityInterface': {
9 10
      target: proxyURL,
      // target: 'https://panda-water.cn',
邓晓峰's avatar
邓晓峰 committed
11 12
      // target: 'http://192.168.19.102:8055',

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