From d7d07416c41b51a30473be7361d98cf72f617181 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Wed, 16 Mar 2016 09:37:10 +0100 Subject: [PATCH] Allow to use port from current page, the same way we allow to use hostname. --- client/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/index.js b/client/index.js index 4f766aea79..dbbb1ee07e 100644 --- a/client/index.js +++ b/client/index.js @@ -63,7 +63,7 @@ var newConnection = function() { protocol: urlParts.protocol, auth: urlParts.auth, hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname, - port: urlParts.port, + port: (urlParts.port == '0') ? window.location.port : urlParts.port, pathname: urlParts.path == null || urlParts.path === '/' ? "/sockjs-node" : urlParts.path }));