Shyam Ramath
Jul 31, 2021

--

you can also create a root certificate, and then generate a localhost or other server identifier certificate. I recommend this solution because this way you can generate certificates for all non production environments and import only one custom certification authority.

While serving your project, make sure https is enabled (ie. $ vue-cli-service serve --https true)

create vue.config.js in your projects root (if not there already)

add the following code to it:

module.exports = {

devServer: {

disableHostCheck: true,

port:8080,

host: 'xxxxxx',

https: true,

//key: fs.readFileSync('./certs/xxxxxx.pem'),

//cert: fs.readFileSync('./certs/xxxxxx.pem'),

pfx: fs.readFileSync('./certs/xxxxxx.pfx'),

pfxPassphrase: "xxxxxx",

public: 'https://xxxxxx:9000/',

https: true,

hotOnly: false,

}

}

--

--

No responses yet