Wrong protocol passed to socket.io #198

toxik opened this Issue Apr 20, 2012 · 4 comments


None yet

2 participants

toxik commented Apr 20, 2012


I have a website running securely at https://example/ and in it I included now.js that runs on the same host but on different port and on the http protocol, insecurely (I want it this way because the speed is a lot better) http://example:8080/now/now.js

The problem is that in order to fetch the socket.io client lib, there's an erroneous request made to https://example:8080/socket.io/socket.io.js

Is there any way I could fix it ?


Manually call nowInitialize (and set opts.autoHost to false).

toxik commented Apr 23, 2012

OK, done that seems to work but I still get a hit to the https link (before loading the correct http link described in nowInitialize). Is that normal behaviour ?


Set autoHost to false (in the options object that you pass in to nowjs.initialize).

If you've already done that, I have no idea; sorry.

toxik commented Apr 26, 2012

It doesn't seem to do any good with autoHost: false

It's ok the way it is now, I can live with that extra https:// request, thanks!

@toxik toxik closed this Apr 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment