Skip to content

Commit

Permalink
Fixed redirect mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 2, 2015
1 parent 1aa8d8d commit d0910e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var config = cc()
// Redirect HTTP/S to HTTP (Invalid certificate in custom domain)
app.use(function(req, res, next) {
if (req.headers['x-forwarded-proto'] == 'https') {
res.redirect('http://' + req.headers.host + req.path);
res.send(302,'http://' + req.headers.host + req.path);
} else {
next();
}
Expand Down

0 comments on commit d0910e0

Please sign in to comment.