Detect connection type before etablishing the socket connection, should solve a problem with a https proxy in front
parent
6d6837a374
commit
3cef5e4b23
|
@ -60,7 +60,11 @@ function randomString() {
|
|||
|
||||
function handshake()
|
||||
{
|
||||
socket = new io.Socket();
|
||||
var host = window.location.hostname;
|
||||
var options = {secure: window.location.protocol == 'https:',
|
||||
port: window.location.port};
|
||||
|
||||
socket = new io.Socket(host, options);
|
||||
socket.connect();
|
||||
|
||||
socket.on('connect', function(){
|
||||
|
|
Loading…
Reference in New Issue