From 64b92f0975c83ce6a820f65b2624f3cd252c06b8 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 17 Feb 2026 07:55:05 -0800 Subject: [PATCH] logging --- src/client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client.ts b/src/client.ts index 3685d4a..de03f78 100644 --- a/src/client.ts +++ b/src/client.ts @@ -113,6 +113,8 @@ export function connect(options: TunnelOptions): Tunnel { const url = `${target}${req.path}` const hasBody = req.method !== "GET" && req.method !== "HEAD" && req.body + console.log(`[tunnel] >> ${req.method} ${url}`, { contentType: req.headers["content-type"], bodyLen: req.body?.length, hasBody }) + const response = await fetch(url, { method: req.method, headers: req.headers, @@ -121,6 +123,7 @@ export function connect(options: TunnelOptions): Tunnel { }) const contentType = response.headers.get("content-type") + console.log(`[tunnel] << ${response.status} ${req.method} ${url}`, { contentType, location: response.headers.get("location") }) const headers: Record = {} response.headers.forEach((value, key) => { headers[key] = value