Reputation: 565
Is it possible to detect the TLS version 1.1 or 1.2 etc in Node Express application.
Upvotes: 4
Views: 3019
Reputation: 4035
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');
});
Upvotes: 4