我使用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
这样就能忽略掉错误:
2022-04-05 14:25:21
我使用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
这样就能忽略掉错误: