I have a vuejs app with the a webpack template https://github.com/vuejs-templates/webpack and I when push to production server I am trying to force it to use https but not when on local.
I could use something like this:
if (location.protocol != 'https:' && location.href != 'localhost')
{
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
}
on the main.js file but it seems like a hack. I'm sure webpack providers a way but I can't find it.