Probe a debug route on `127.0.0.1: ` regardless of the bound host.
(r: RunningServer)
| 70 | |
| 71 | /** Probe a debug route on `127.0.0.1:<port>` regardless of the bound host. */ |
| 72 | async 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 | |
| 80 | describe('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 () => { |
no test coverage detected