We are about to upgrade our TLS version and I want to make sure that nothing breaks in our http requests. We're using axios as our library of choice to make requests and I'm just wondering if anyone knows what TLS versions are supported by axios? Thank you.
As a server, axios uses node's underlying http
and https
implementation judging from the code on GitHub. For node, the answer your question is "whatever your version of node supports". Practically speaking, recent versions of node support TLS 1.0 through 1.3.
Node by default statically links OpenSSL, so the answer for node can depend on what version of OpenSSL (or alternative TLS library) Node was compiled with; or if it is using dynamic loading.
Assuming the pre-built node packages, node 6.x+ have support for TLS up to TLSv1.2. Node 11.x has support for TLSv1.3, but it needs to be enabled with maxVersion
or DEFAULT_MAX_VERSION
; and node 12.x has support for TLSv1.3 out of the box.
If you are using axios in a browser, then it will use xhr.js, and TLS support will be provided by the browser. This is where it gets a little more complicated. Most browsers support TLS 1.2, but not all. All recent versions of browsers do. You can use SSLLab's list of browser versions to determine what version of TLS they support.