2

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 2

5

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

Sign up to request clarification or add additional context in comments.

2 Comments

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
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
2

The solution was instead of running the server with yarn serve, use yarn serve --https

1 Comment

npm WARN invalid config https-proxy=true npm WARN invalid config Must be a full url with 'http://'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.