Skip to content

Commit d7d0741

Browse files
committed
Allow to use port from current page, the same way we allow to use hostname.
1 parent 3dd3e2a commit d7d0741

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
@@ -63,7 +63,7 @@ var newConnection = function() {
6363
protocol: urlParts.protocol,
6464
auth: urlParts.auth,
6565
hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
66-
port: urlParts.port,
66+
port: (urlParts.port == '0') ? window.location.port : urlParts.port,
6767
pathname: urlParts.path == null || urlParts.path === '/' ? "/sockjs-node" : urlParts.path
6868
}));
6969

0 commit comments

Comments
 (0)