Hello for nodejs programming, I am using visual studio community 2015 with node js tools. That environment does not have NODE_TLS_REJECT_UNAUTHORIZED process.env variable. What is the package to install NODE_TLS_REJECT_UNAUTHORIZED variable?
There is no package for environment variables, you just set them or not in your shell environment. For Windows if you wanted to set it you'd first do:
set NODE_TLS_REJECT_UNAUTHORIZED=1 node foo.js
For *nix you could do something like:
NODE_TLS_REJECT_UNAUTHORIZED=1 node foo.js
or to make it persistent for the duration of the shell session:
export NODE_TLS_REJECT_UNAUTHORIZED=1 node foo.js
However you really should avoid the rejectUnauthorized setting and if applicable, instead supply the self-signed CA when making https requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With