Skip to content

Commit 94810f1

Browse files
committed
fix: use selectedHost for localHttpUrl/localWsUrl when binding specific interface
When a specific non-loopback host is selected in network-accessible mode, the server binds only to that interface. The local URLs must use the same host instead of hardcoded 127.0.0.1, otherwise the desktop app cannot reach the backend (connection refused on loopback).
1 parent d86ab49 commit 94810f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/desktop/src/serverExposure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export function resolveDesktopServerExposure(input: {
130130
return {
131131
mode: input.mode,
132132
bindHost: selectedHost,
133-
localHttpUrl,
134-
localWsUrl,
133+
localHttpUrl: `http://${selectedHost}:${input.port}`,
134+
localWsUrl: `ws://${selectedHost}:${input.port}`,
135135
endpointUrl: `http://${selectedHost}:${input.port}`,
136136
advertisedHost: selectedHost,
137137
availableHosts,

0 commit comments

Comments
 (0)