Is there a way to get the protocol (http|https) in Express?
app.get('/protocol', function (req, res) {
res.send(req.protocol);
});
Though, you may also need to enable
trust proxy
for your application:
app.configure('production', function () {
app.enable('trust proxy');
});