Skip to content

Commit 0bd7252

Browse files
committed
Merge pull request #263 from thenewguy/bind-all
allow bind to all host (--host 0.0.0.0)
2 parents 6b7bee2 + eb50101 commit 0bd7252

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ io = io.connect(
1212
url.format({
1313
protocol: urlParts.protocol,
1414
auth: urlParts.auth,
15-
host: urlParts.host
15+
hostname: (urlParts.hostname === '0.0.0.0') ? window.location.hostname : urlParts.hostname,
16+
port: urlParts.port
1617
}), {
1718
path: urlParts.path === '/' ? null : urlParts.path
1819
}

0 commit comments

Comments
 (0)