rtc-io / rtc-switchboard

Node server side in memory signaller for rtc.io components
http://www.rtc.io/modules.html
57 stars 36 forks source link

Serving switchboard over HTTPS #30

Open glenn-kroeze opened 7 years ago

glenn-kroeze commented 7 years ago

Hi, I'm currently doing a college project which requires video and audio transmission from person to person within a browser. rtc.io seems like a great way to achieve this. I am however running into a problem. I am serving the HTML page with the rtc.io content over HTTPS, since Chrome requires HTTPS to be used when handling the webcam. While this isn't an issue perse, the problem arises when I try to connect a client to a self-hosted switchboard. Chrome will only allow me connect a client to a switchboard if the switchboard is also served over HTTPS, which it isn't as far as I can tell. What would be the correct way to connect a client to the switchboard over HTTPS?

silviapfeiffer commented 7 years ago

Are you self-hosting a switchboard? If so, there are several ways in which you can put it behind https. Easiest is to put an nginx server in front of it. See e.g. https://www.sitepoint.com/configuring-nginx-ssl-node-js/

glenn-kroeze commented 7 years ago

Hi, thanks a lot for your reply! I'll try to implement nginx as soon as I get the chance. I'm curious though, why doesn't rtc.io supply any solution for this at the moment, since the switchboard can only be used in practice when combined with HTTPS?

silviapfeiffer commented 7 years ago

You can. You just need to extend the example with a node ssl module. E.g. the https or tls modules, see https://www.sitepoint.com/how-to-use-ssltls-with-node-js/