Flotype/now — Issue #167: server.js serves now.js client with incorrect port for socket.io
Author: matthiasak
Created: 2011-12-19 22:23:42+00:00
State: open

I have a server setup, which initializes on port 443.

With port 443, the now.js is served to the browser just fine. The issue is when the browser tries to pull in socket.io as well.

The socket.io file pointed to by now.js client file is at https://mysite:80 instead of :443. This is causing issues with now, obviously, and I wanted to serve from 443 since a lot of my client's firewalls block other ports.

Here's the final catch: The browser sees that I am pulling an https link and simply removes the :443 from the URL to grab socket io,

thus my script which should grab https://mysite:443/nowjs/now.js just grabs https://mysite/nowjs/now.js

this is the root cause of the issue, as if the browser were to call for the first link instead of the second, then socket.io would also be called over :443, but since it isnt the code in the fileServer.js simply serves the file over :80.

Is there any way around this?