/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'https://work.panda-water.cn';

module.exports = {
  assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
  dev: {
    '/CityInterface': {
      target: proxyURL,
      // target: 'https://panda-water.cn',
      // target: 'http://192.168.19.102:8055',

      // target: 'https://panda-water.com',
      // target: 'http://192.168.10.150:8050',
      // target: 'http://192.168.19.103:8112',
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityInterface': '/CityInterface',
      },
    },
    '/cityinterface': {
      target: proxyURL,
      // target: 'http://192.168.10.150:8050',
      // target: 'https://panda-water.cn',
      // 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: {
        '/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': {
      target: proxyURL,
      // target: 'http://192.168.12.8:8098',
      // target: 'http://192.168.10.20:8888',
      // target: 'http://192.168.10.151:8055',
      // target: 'https://panda-water.cn',
      // target: 'http://192.168.19.102:8055',
      // target: 'https://panda-water.com',
      // target: 'http://192.168.10.150:8050',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Publish': '/Publish',
      },
    },
    '/PandaCore': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/PandaCore': '/PandaCore',
      },
    },
    '/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',
      },
  },
    '/CityTemp': {
      // target: 'http://192.168.10.150:8777',
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/CityTemp': '/CityTemp',
      },
    },
    '/civweb4': {
      target: proxyURL,
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/civweb4': '/civweb4',
      },
    },
    '/web4': {
      target: "https://panda-water.cn",
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        'web4': 'web4',
      },
    }
  },
  pre: {
    '/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': '*',
      },
      pathRewrite: {
        '/cityinterface': '/cityinterface',
      },
    },
    '/cityjson': {
      target: 'https://pv.sohu.com',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/cityjson': '/cityjson',
      },
    },
    '/Publish': {
      target: 'https://panda-water.cn',
      changeOrigin: true,
      headers: {
        'Access-Control-Allow-Origin': '*',
      },
      pathRewrite: {
        '/Publish': '/Publish',
      },
    },
  },
};
