首页 > 其他分享 > error:unable to verfiy the first certificate

error:unable to verfiy the first certificate

时间:2023-03-14 09:23:27浏览次数:24  
标签:certificate 证书 verfiy SSL unable error

在这个例子中,我们创建了一个新的https.Agent实例,
并将其作为httpsAgent选项传递给axios.get()方法。
我们通过设置rejectUnauthorized选项为false来禁用SSL证书验证。

如果您需要在生产环境中使用自签名的SSL证书,
最好的方法是将SSL证书添加到Node.js的信任证书列表中,
或者使用由受信任的CA机构签发的SSL证书。

标签:certificate,证书,verfiy,SSL,unable,error
From: https://www.cnblogs.com/pansidong/p/17213696.html

相关文章