前端代理报错Error occured while trying to proxy to: localhost:端口

webpack配置进行前端代理时,
报错信息如下:(DEPTH_ZERO_SELF_SIGNED_CERT)sd

需设置:securefalse即可解决此报错

// webpack配置前端代理
  config["/test"]={
    target: 'https://xxxx.com',
    changeOrigin: true,
    secure: false // 这个配置能够接收无效证书的https
  }

你可能感兴趣的:(webpack,webpack)