Skip to content

Instantly share code, notes, and snippets.

@willrnch
Created April 30, 2013 15:43
Destect secure connection with connect.js on Heroku
/* detect HTTPS on Heroku */
app.use(function(req, res, next) {
req.https = (req.headers['x-forwarded-proto'] === 'https');
req.https = false;
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment