peer.js:861 Mixed Content:

44 views
Skip to first unread message

Fernando Skackauskas

unread,
Jan 30, 2018, 12:14:51 PM1/30/18
to PeerJS
Hello team.

I developed a website using PeerJs.

But when I run the program, it gives the following message:

peer.js:861 Mixed Content: The page at 'https://conciliar.org/conciliacao_v4.php?' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://0.peerjs.com:9000/tadjksnufvlvj9k9/id?ts=15173320214600.19934609431789796'. This request has been blocked; the content must be served over HTTPS.

The code is:

  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/peerjs/0.3.14/peer.js"></script>
  <script type="text/javascript" scr="https://cdnjs.cloudflare.com/ajax/libs/peerjs/0.3.14/peer.min.js"></script>

  <script>
    // Compatibility shim
    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

    // PeerJS object
    var peer = new Peer({ key: 'tadjksnufvlvj9k9'});
    peer.on('open', function(){
      $('#my-id').text(peer.id);
    });
  </script>

I understand the peer.js is calling a http instead https.

How can I solve this problem?  

Thanks,

Fernando Skackauskas
Reply all
Reply to author
Forward
0 new messages