Nodejs redirect to https protocol
Im trying to redirect user from http//my-domain and https://www.my-domain to https://my-domain my first idea was to use .htaccess file but, as i understand it doesn’t work on Nodejs This function was my attempt to recreate .htaccess logic in code app.use((req, res, next) => { if (req.protocol === ‘http’) { return res.redirect(301, ‘https://’ + req.headers.host +… Read More Nodejs redirect to https protocol