Is there an easy way to do this? I've googled and none of the answers worked for me. I need to do this to enable a facebook login which only works through HTTPS. I've generated the SSL certificates however I don't know how to configure the server to enable HTTPS.
2 Answers
If you are using the new(er) vue-cli-service then you can run the development server as per https://cli.vuejs.org/guide/cli-service.html#vue-cli-service-serve
Simply edit your package.json:
"scripts": {
"serve": "vue-cli-service serve --https",
...
}
I was trying to work out how to get Chrome on Android to successfully use the unsafely-treat-insecure-origin-as-secure flag, without any luck. At least this allows me to test my vue aplicat
2 Comments
dataviews
worked for me. I needed HTTPS to be able to test my app on iOS safari, so by adding the "--https" I can access that now even with a bad certificate
Fernando Torres
Mmm, i recieve always the error sockjs.js?9be2:1609 GET 192.168.0.2:8080/sockjs-node/info?t=1626909596955 net::ERR_CERT_AUTHORITY_INVALID in the console after do this
The solution was instead of running the server with yarn serve, use yarn serve --https
1 Comment
Fernando Torres
npm WARN invalid config https-proxy=true npm WARN invalid config Must be a full url with 'http://'