Skip to content

Commit eef546c

Browse files
lidge-junclaude
andcommitted
fix: use healthHost() in checkProxyHealth for custom hostname bindings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c8badd0 commit eef546c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ type HealthCheck = {
370370
label: string;
371371
};
372372

373-
async function checkProxyHealth(port: number): Promise<HealthCheck> {
374-
const url = `http://127.0.0.1:${port}/healthz`;
373+
async function checkProxyHealth(port: number, hostname?: string): Promise<HealthCheck> {
374+
const url = `http://${healthHost(hostname)}:${port}/healthz`;
375375
const controller = new AbortController();
376376
const timer = setTimeout(() => controller.abort(), 800);
377377
try {
@@ -393,7 +393,7 @@ async function handleStatus() {
393393
const config = loadConfig();
394394
const port = config.port ?? 10100;
395395
const pid = readPid();
396-
const health = await checkProxyHealth(port);
396+
const health = await checkProxyHealth(port, config.hostname);
397397
const proxyLabel = pid && health.ok
398398
? `running (PID ${pid})`
399399
: pid

0 commit comments

Comments
 (0)