On my own server I’m making a server-side DDP connection to another server hosted on Internet (at meteor.com).
var remoteURL = “http://appname.meteor.com”;
var conn = DDP.connect(remoteURL);
RemoteEvents = new Mongo.Collection(“RemoteEvents”, conn);
with the resulting error in the server console:
stream error Can’t establish a connection to the server at ws://appname.meteor.com/websocket
If I start a browser on my server and browse to the remote application I can see in the dev console that it’s making a fallback and is doing XMLHttpRequests to https://ddp–0889-appname.meteor.com/sockjs/info.
So, browsing an application at meteor.com will cause my browser to fallback to XMLHttpRequest instead of DDP (probably due to some firewalls that I’m not in control of).
On the same machine, my server-side code can’t make a DDP connection to the remote application.
What’s going on here? Shouldn’t my server-side code that makes a DDP-connection fallback to a working protocol?
I’m stuck on this, any suggestions or workarounds?