更新时间:2021-10-02 06:24:11
我使用nodejs提供的request module向一个https发起请求,遇到下面这个错误:
DEPTH_ZERO_SELF_SIGNED_CERT
self signed certificate
解决方案:
在构造http请求时,指定:
strictSSL: false, // allow us to use our self-signed cert for testing
rejectUnauthorized: false
这样就能忽略掉错误: