I am trying to connect from a remote Chrome browser to my server (node server.js). The request is failing with an error:
"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS."
This Chrome error is well documents. Newer versions of Chrome require https for this method to work.
So my questions is how to setup the server for https requests? I have set "https": true in the configuration file. I would really appreciate detail of how to create and install ssl cert and key for the houndify server. I am using the node.js.
BTW requests from localhost works perfectly.
Thanks, Shahriar
You can find a useful info about setting up https server in node.js here: https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/.
Half of work is actually done in our example NodeJS server and you’ve correctly set
httpsto true inconfig.json. You only need to generate “server.key” and “server.crt” files and put them in the same directory asserver.js. If you want to use different location or filename, make sure you change values ofsslKeyFileandsslCrtFileinconfig.json.So for testing purposes you can generate self-signed certificate as opposed to 'Certificate Authority’-signed like this. Run following commands in the project's root directory: