0

I have a local development environment for Vue.js where I'm wanting to use HTTPS.

Within my vue.config.js file I have:

module.exports = {
    devServer: {
        open: process.platform === 'darwin',
        host: '0.0.0.0',
        port: 8080,
        hotOnly: false,
        publicPath: '',
        https: true,
    },
}

With https set to true I get this:

enter image description here However, the certificate is trusted within the "Keychain Access" application:

enter image description here I'm using Chrome Version 76.0.3809.100 (Official Build) (64-bit) on macOS Mojave v10.14.

How can I make chrome trust this self signed certificate that the Vue configuration seems to be using? Firefox gives a comparable error just stating that it's a self signed certificate.

Alternatively, is there a better way to set up HTTPS for a local development environment?

ChristianF
  • 1,735
  • 4
  • 28
  • 56
  • Possible duplicate of [Getting Chrome to accept self-signed localhost certificate](https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate) – Ohgodwhy Aug 25 '19 at 22:32
  • I've looked at some of the answers there including getting the keychain to trust the certificate (pictured in my question), and setting `chrome://flags/#allow-insecure-localhost` to enabled. None of the applicable answers have worked so far – ChristianF Aug 25 '19 at 22:35
  • Use `mkcert` to generate your own and turn it into a chain and trust that. – Ohgodwhy Aug 26 '19 at 00:38

0 Answers0