Skip to content

Commit 3767f41

Browse files
pcorpetSpaceK33z
authored andcommitted
Allow to use port from current page, the same way we allow to use hostname.
1 parent 0f013aa commit 3767f41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var newConnection = function() {
6262
protocol: urlParts.protocol,
6363
auth: urlParts.auth,
6464
hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
65-
port: urlParts.port,
65+
port: (urlParts.port == '0') ? window.location.port : urlParts.port,
6666
pathname: urlParts.path == null || urlParts.path === '/' ? "/sockjs-node" : urlParts.path
6767
}));
6868

0 commit comments

Comments
 (0)