问题
Is it possible to detect the TLS version 1.1 or 1.2 etc in Node Express application.
回答1:
If your are using express you can try with:
app.get('/', (req, res, next) => {
if (req.protocol === 'https')
console.log(req.connection.getProtocol());
else
console.log('Not SSL');
});
来源:https://stackoverflow.com/questions/40884796/detect-tls-version-in-node-express-app