Skip to content

Commit eb50101

Browse files
committed
Update index.js
'0.0.0.0' allows webpack-dev-server to bind to all addresses on the machine but cannot be navigated to so use window.location.hostname in this case
1 parent 6b7bee2 commit eb50101

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)