Peerjs: PeerJS makes a blocked HTTP request when served over HTTPS

Created on 29 Dec 2015  路  2Comments  路  Source: peers/peerjs

When served over HTTPS, the code new Peer({key: '...'}) generates the error:

Mixed Content: The page at 'https://domain:port/path' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://0.peerjs.com:9000/lwjd5qra8257b9/id?ts=14513993067080.44465259928256273'. This request has been blocked; the content must be served over HTTPS.

I'm using Chrome 47.

Since one must also serve over HTTPS in order to request webcam/microphone, this makes the hosted server a bit useless.

Is there a fix for this? Am I doing something stupid to cause it to make a request over HTTP, or is this PeerJS's error?

Most helpful comment

It seems that Firefox is no longer an option for mixed content now:
https://support.mozilla.org/t5/Protect-your-privacy/Mixed-content-blocking-in-Firefox/ta-p/10990

It would have been nice to be able to use the cloud server from peerjs to do some small apps without having to host an own https service with peerjs installed :(

All 2 comments

Hi,
It is not PeerJS's error. You have 2 options:

  1. Build your own PeerJS-Server which served over HTTPS
  2. Using Firefox browser

Hope this help

It seems that Firefox is no longer an option for mixed content now:
https://support.mozilla.org/t5/Protect-your-privacy/Mixed-content-blocking-in-Firefox/ta-p/10990

It would have been nice to be able to use the cloud server from peerjs to do some small apps without having to host an own https service with peerjs installed :(

Was this page helpful?
0 / 5 - 0 ratings