Closed matthiasak closed 12 years ago
You could always disable autohosting and call nowInitialize yourself.
Not done that before. I've been looking for documentation on this but it seems the NowJS docs are lacking what it does. Could you toss me a few pointers?
Set autoHost
to false
in the server-side configuration, and on the client side, add something like var now = nowInitialize("https://mysite:443");
I think this should work, but it's been a while since I've played around with NowJS extensively.
That does help! Thanks steve!
Should this be closed? It seems like a legitimate bug that should be addressed in nowjs, not worked around by everybody using it in a secure environment.
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?