On Node.js, TLS and HTTPS will validate certificates before accepting them. Therefore, to use self-signed certificates with Node, you will need to set the rejectUnauthorized
option when performing requests to false
, or use:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
Here's an old pull request that pertains to this problem.