2016-11-30 15 views

回答

0

如果您正在使用express,你可以嘗試使用:

app.get('/', (req, res, next) => { 
    if (req.protocol === 'https') 
    console.log(req.connection.getProtocol()); 
    else 
    console.log('Not SSL'); 
}); 
相關問題