Skip to content

Commit 991f2aa

Browse files
committed
merged #443
1 parent 76a51d5 commit 991f2aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ var onSocketMsg = {
6060

6161
var newConnection = function() {
6262
sock = new SockJS(url.format({
63-
protocol: (window.location.protocol == "https:") ? "https:" : urlParts.protocol,
63+
protocol: (window.location.protocol === "https:" || urlParts.hostname === '0.0.0.0') ? window.location.protocol : urlParts.protocol,
6464
auth: urlParts.auth,
6565
hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
66-
port: (urlParts.port == '0') ? window.location.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)