I have a node app running successfully on Heroku. I have purchased an Expedited SSL certificate and it all works fine. I go to https... and get a full \'green bar\' proving
For anybody coming along to this post, I was having this problem and discovered that I had code in this order, which was screwing things up:
app.use(express.static('build'));
app.use((req, res, next) => {
if (req.header('x-forwarded-proto') !== 'https') {
res.redirect(`https://${req.header('host')}${req.url}`)
} else {
next();
}
});
Once I moved the express.static('build') below that send app.use method everything worked!