invalid self-signed ssl certificate


down voteaccepted

Cheap and insecure answer:

Add

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

in code, before calling https.request()

A more secure way (the solution above makes the whole node process insecure) is answered in this question

https://stackoverflow.com/questions/20433287/node-js-request-cert-has-expired#answer-29397100

原文地址:https://www.cnblogs.com/cbugs/p/8302360.html