node使用superagent库,请求时报错unable to verify the first certificate
表示客户端无法验证 服务器提供的SSL证书链中的第一个证书
解决方法
在代码中直接加入
或
然后再进行请求即可解决
如问题无法解决
使用superagent关闭ssl验证报错
Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment varia
ble to ‘0’ makes TLS connections and HTTPS requests insecure by disabling certif
icate verification.
则可引入https禁止ssl验证
所有评论(0)