https://derekcolley.medium.com/vue-js-develop-with-https-2b95ad120a72
- Add this to /etc/hosts file
127.0.0.1 dev.local
ping dev.local
to check connection
https://github.com/FiloSottile/mkcert
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
import { readFileSync } from "fs";
server: {
host: "dev.local",
port: 8080,
// disableHostCheck: true,
https: {
key: readFileSync("./certs/dev.local+4-key.pem"),
cert: readFileSync("./certs/dev.local+4.pem"),
//ca: readFileSync('./certs/my-ca.crt')
},
proxy: {
"^/api": {
target: "http://localhost:1337",
changeOrigin: true,
},
},
},