Skip to content

Commit

Permalink
switched https detection method
Browse files Browse the repository at this point in the history
  • Loading branch information
jakepeyser committed May 10, 2017
1 parent 0c309ec commit 887d2dc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ if (process.env.NODE_ENV !== 'production') {
// React to an unsecure request over http
if (process.env.NODE_ENV === 'production') {
app.use('*', function(req, res, next) {
console.log('secure:', req.secure)
console.log('headers:', req.headers)
console.log('url:', req.url)
console.log(req)
// Continue if SSL
if (req.secure)
if (req.headers['x-forwarded-proto'] === 'https')
next()
// Redirect GET requests to https
else if (req.method === 'GET')
Expand Down

0 comments on commit 887d2dc

Please sign in to comment.