I\'m writing a Node.js app that has to request some data from one of our internal APIs. The tricky part is that the server I\'m requesting data from has certain limitations:
Set this process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; Fixed the UNABLE_TO_VERIFY_LEAF_SIGNATURE problem for superagent.
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
UNABLE_TO_VERIFY_LEAF_SIGNATURE