Skip to content

Commit 0210d86

Browse files
committed
chore(web): bind sandbox proxies to ipv4 to avoid dealing with localhost dns resolution
1 parent b4495d0 commit 0210d86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/compass-web/scripts/electron-proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ void electronApp.dock?.hide();
344344

345345
logger.log('[electron-proxy] starting proxy server on port %s', PROXY_PORT);
346346

347-
const proxyServer = expressProxy.listen(PROXY_PORT, 'localhost');
347+
const proxyServer = expressProxy.listen(PROXY_PORT, '0.0.0.0');
348348

349349
/**
350350
* Keeping a track of websocket proxy sockets so that we can clean them up on

packages/compass-web/scripts/ws-proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { WebSocketServer } = require('ws');
1010
* every follow-up message is directly written to the opened socket stream
1111
*/
1212
function createWebSocketProxy(port = 1337, logger = console) {
13-
const wsServer = new WebSocketServer({ host: 'localhost', port }, () => {
13+
const wsServer = new WebSocketServer({ host: '0.0.0.0', port }, () => {
1414
logger.log('ws server listening at %s', wsServer.options.port);
1515
});
1616

0 commit comments

Comments
 (0)