JavaScript Node.js Basics (2014) Building a Command Line Application Making a GET Request with http

How to bypass the self signed certificate(https) ?

I need to bypass the self signed certificate.(ie. without checking the certificate).

2 Answers

There are a couple of options, one far less secure than the other, described on Stack Overflow:

Node.js request CERT_HAS_EXPIRED

tldr; add this to the top of your file:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

Thanks Iain Simmons.

If my answer helped, please mark it as best answer. :smile: