Server-side DDP fallback?


On my own server I’m making a server-side DDP connection to another server hosted on Internet (at

// Server
var remoteURL = “”;
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://

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–

So, browsing an application at 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?