[Fix Err] Node.js request CERT_HAS_EXPIRED

Table of Contents

[Fix Err] Node.js request CERT_HAS_EXPIRED

Node.js request CERT_HAS_EXPIRED

image

Fix Node.js request CERT_HAS_EXPIRED

Add this at the top of your file:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

DANGEROUS This disables HTTPS / SSL / TLS checking across your entire node.js environment. Please see the solution using an https agent below.

References

  1. https://stackoverflow.com/questions/20433287/node-js-request-cert-has-expired

Leave a Reply

Your email address will not be published. Required fields are marked *