Created
April 16, 2018 23:10
-
-
Save digitalbocca/aeb2cc257c659d3311a2f6e75dc68d10 to your computer and use it in GitHub Desktop.
https to http - express
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
req.headers['x-forwarded-proto'] === 'http' ? next() : res.redirect('http://' + req.hostname + req.originalUrl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment