MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / probeDebug

Function probeDebug

packages/server/test/debug-nonloopback.e2e.test.ts:72–78  ·  view source on GitHub ↗

Probe a debug route on `127.0.0.1: ` regardless of the bound host.

(r: RunningServer)

Source from the content-addressed store, hash-verified

70
71/** Probe a debug route on `127.0.0.1:<port>` regardless of the bound host. */
72async function probeDebug(r: RunningServer): Promise<number> {
73 const port = new URL(r.address).port;
74 const res = await fetch(`http://127.0.0.1:${port}/api/v1/debug/prompts/some-session/state`, {
75 headers: authHeaders(),
76 });
77 return res.status;
78}
79
80describe('debug endpoints are loopback-only (M5.3)', () => {
81 it('does NOT mount /api/v1/debug/* on a non-loopback bind (0.0.0.0)', async () => {

Callers 1

Calls 1

authHeadersFunction · 0.90

Tested by

no test coverage detected