简体   繁体   中英

How to set the allowed protocol for a node.js HTTPS server?

I have built a HTTPS server using the default https module and express .

However, I can't find anywhere how to tell it to only use the latest version of TLS, nor any information on which version of SSL/TLS was supported by the default server.

I did found some express middlware promising to enforce SSL , but SSL is obsolete since 2015, and there is still no information on which version is enforced.

How can I define which version of TLS to use for my app? Or at least how to find out which version is used?

Have a look in the nodejs documentation. They refer to your OpenSSL version, for example here .

So if you set secureProtocol in the options, you can choose the protocol.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM