Skip to content

Commit

Permalink
Merge pull request #430 from pcorpet/allow-variable-port
Browse files Browse the repository at this point in the history
Guess server's port from current page.
  • Loading branch information
sokra committed Mar 24, 2016
2 parents 7df2812 + d7d0741 commit e5df542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/index.js
Expand Up @@ -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
}));

Expand Down

0 comments on commit e5df542

Please sign in to comment.