Sockets cloudflare SSH和套接字:如何一起运行它们?

Sockets cloudflare SSH和套接字:如何一起运行它们?,sockets,socket.io,cloudflare,Sockets,Socket.io,Cloudflare,我正在使用来自cloudflare的灵活SSL,因此我的站点现在是 https://www.example.com 在我的站点中,我使用socket.io: server = 'http://direct.example.com'; socket = io.connect(server+":1445" , {'force new connection': true }); 问题是我得到了: Mixed Content: The page at 'https://' was loaded

我正在使用来自cloudflare的灵活SSL,因此我的站点现在是

https://www.example.com

在我的站点中,我使用socket.io:

server = 'http://direct.example.com';
socket = io.connect(server+":1445" , {'force new connection': true });
问题是我得到了:

    Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 
'http://direct.example.com:1445/socket.io/?EIO=3&transport=polling&t=1434191759199-17'. 
那么,我如何在我的站点上保留https并从我的服务器调用套接字呢


(我的服务器没有任何SSL:我使用cloudflare提供的灵活SSL)

cloudflare现在不能为企业客户以外的任何人代理WebSocket(我们将在今年晚些时候推出更广泛的支持)。除非它现在正在检查其中一个端口,否则它需要位于我们不接触的子域上(这也意味着SSL不起作用)。

你的意思是:如果我的nodejs socket.io使用这些端口中的一个443 2053 2083 2087 2096 8443,它会起作用吗?不确定它是否会起作用(还有其他问题)。关于在我们的博客上支持WebSocket的挑战,我们有一个很好的解释。见: