(init: { status?: number; headers?: Record<string, string> })
| 25 | import { detectMcpAuthType } from '@/lib/mcp/oauth/probe' |
| 26 | |
| 27 | function makeResponse(init: { status?: number; headers?: Record<string, string> }): Response { |
| 28 | const status = init.status ?? 200 |
| 29 | return { |
| 30 | status, |
| 31 | ok: status >= 200 && status < 300, |
| 32 | headers: new Headers(init.headers ?? {}), |
| 33 | } as unknown as Response |
| 34 | } |
| 35 | |
| 36 | describe('detectMcpAuthType — connection pinning (SSRF / DNS-rebinding)', () => { |
| 37 | let globalFetchSpy: ReturnType<typeof vi.fn> |