Created
April 30, 2013 15:43
Destect secure connection with connect.js on Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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