From e54e9acce574ceefefd209017f7e9e8d6a3a4639 Mon Sep 17 00:00:00 2001 From: Devin Zuczek Date: Fri, 17 Jul 2026 18:05:22 -0400 Subject: [PATCH] auth debug --- apps/auth/src/auth.app.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/auth/src/auth.app.ts b/apps/auth/src/auth.app.ts index cab346b..7835e02 100644 --- a/apps/auth/src/auth.app.ts +++ b/apps/auth/src/auth.app.ts @@ -207,6 +207,20 @@ const app = new Hono() })(c, next) ) + // DEBUG: dump every incoming request (method, url, headers, body). Clone the raw + // request so reading the body here doesn't consume the stream the handlers need. + .use('*', async (c, next) => { + const clone = c.req.raw.clone() + const body = await clone.text().catch(() => '') + logger.info('incoming request', { + method: c.req.method, + url: c.req.url, + headers: Object.fromEntries(c.req.raw.headers), + body, + }) + await next() + }) + .onError(withOnError()) .notFound(withNotFound())