Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Wrong protocol passed to socket.io #198

Closed
toxik opened this Issue · 4 comments

2 participants

@toxik

Hi!

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 ?

@steveWang

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

@toxik

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 ?

@steveWang

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.