const proxy = {
  '/auth': {
    // target: 'http://home.robot-z.cn:7001',
    target: 'https://es.robot-z.cn',
    changeOrigin: true,
    secure: false,
    pathRewrite: { '^/auth': '' },
    onProxyRes: function (proxyRes) {
      proxyRes.headers['Access-Control-Allow-Origin'] = '*';
      proxyRes.headers['Access-Control-Allow-Methods'] = 'GET,PUT,POST,DELETE,OPTIONS';
      proxyRes.headers['Access-Control-Allow-Headers'] = 'Content-Type, Authorization';
      proxyRes.headers['Access-Control-Allow-Credentials'] = 'true';
    }
  }
}

export default proxy;
