Detect TLS Version in Node Express App?

自闭症网瘾萝莉.ら 提交于 2020-01-04 05:46:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!