-
|
Hello, Thank you for putting this template together. We are using it to build a mobile web app. This web app needs to connect to the device's camera. We would like to accomplish this using VinceG/vue-web-cam#45, but as per that issue, the page needs to be running in https in order for this to work. It seems to me that the documentation for getting this to run with https assumes that this is happening on a VPS. What is the simplest way to get this to run with https locally? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
|
Im not using Swarm and I'm exactly trying to figure out the samething. No matter what i change in docker-compose for treafik, it doesn't work. Still searching ... |
Beta Was this translation helpful? Give feedback.
-
|
Here's an extremely hacky workaround using https://github.com/rchampourlier/tunnelss. Assuming your development server's LAN IP is 192.168.0.98, and you want to access it with https on iOS: Now https://192.168.0.98 proxies to http://localhost, and serves a certificate that is good enough for iOS Safari. (You will also need to set The main drawback of this is that you need to restart the (This will also require adding https://192.168.0.98:8080 to Now you can access https://192.168.0.98:8080 on iOS Safari with hot reloading. It would be great if there was a supported way to get https working locally! |
Beta Was this translation helpful? Give feedback.
-
|
tried setting https true in vue config? |
Beta Was this translation helpful? Give feedback.
-
|
@haviduck can you please clarify what you are referring to more specifically? Which vue config? |
Beta Was this translation helpful? Give feedback.
-
|
i havent tried it myself, but id try changing up the envs. and on serve you can try the various vue cli options like --host and --port so "bla bla serve --host 127.0.0.1 --port 443 if This is for development, id keep it simple and Just do chrome://flags/#allow-insecure-localhost theres also this |
Beta Was this translation helpful? Give feedback.
-
|
In case anyone comes back to this, HTTPS certificates are attached to a domain, that is what they certify, so there wouldn't be a straightforward way to have proper HTTPS certificates for localhost, there could be some tricks around it but not a "proper" thing. For example:
|
Beta Was this translation helpful? Give feedback.
In case anyone comes back to this, HTTPS certificates are attached to a domain, that is what they certify, so there wouldn't be a straightforward way to have proper HTTPS certificates for localhost, there could be some tricks around it but not a "proper" thing. For example:
localhost.mysuperdomain.compointing in the DNS records to127.0.0.1, and then setting up the HTTPS certificates by doing a Let's Encrypt DNS challenge (writing stuff to the DNS records instead of using HTTP). And then using those…