Home

Issue: 870

Content flashes then vanishes under HTTPS

[issue link]

Hi

I am deploying to Heroku, and using HTTPS. I have a custom server file, with the following middleware function

const forceSsl = (req, res, next) => {
    if (req.headers['x-forwarded-proto'] !== 'https') {
        return res.redirect(['https://', req.get('Host'), req.url].join(''));
    }
    return next();
};

if (process.env.NODE_ENV === 'production'){
    app.use(forceSsl);
}

For some reason, the content displays for a split second then vanishes and I am just left with the footer.

Any ideas?
screen shot 2017-06-10 at 17 48 47

The domain is https://www.agencyadvice.co.uk

This question is available on Nuxt.js community (#c749)