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');
});