Reputation: 1955
We are using NodeJS server with Node Version 12. Our server also makes request to other servers to get some data. Out of the box Node is using TLS 1.3 for making these requests to other server.
Can we force NodeJS to use TLS1.2 instead of 1.3 ?!
I have seen the tips to configure NodeJS http server to use TLS1.2 but how to configure my overall Node application to use TLS1.2 for sending requests?
Upvotes: 3
Views: 817
Reputation: 30715
There are ways of doing this for specific http / https clients. To do this globally is a little more tricky.
There is a command line option for node.js, documented here:
https://nodejs.org/api/tls.html#tls_tls_default_max_version
Essentially you would invoke node.js like so:
node --tls-max-v1.2 .\script.js
I'm not sure this will work, but it might be worth a try!
Upvotes: 1