Skip to content

Commit e5df542

Browse files
committed
Merge pull request #430 from pcorpet/allow-variable-port
Guess server's port from current page.
2 parents 7df2812 + d7d0741 commit e5df542

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)