Skip to content

Commit 47c1699

Browse files
sokraSpaceK33z
authored andcommitted
merged #443
1 parent 8da1e57 commit 47c1699

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
@@ -58,10 +58,10 @@ var onSocketMsg = {
5858

5959
var newConnection = function() {
6060
sock = new SockJS(url.format({
61-
protocol: (window.location.protocol == "https:") ? "https:" : urlParts.protocol,
61+
protocol: (window.location.protocol === "https:" || urlParts.hostname === '0.0.0.0') ? window.location.protocol : urlParts.protocol,
6262
auth: urlParts.auth,
6363
hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
64-
port: (urlParts.port == '0') ? window.location.port : urlParts.port,
64+
port: (urlParts.port === '0') ? window.location.port : urlParts.port,
6565
pathname: urlParts.path == null || urlParts.path === '/' ? "/sockjs-node" : urlParts.path
6666
}));
6767

0 commit comments

Comments
 (0)