From a4d86dc3c2c1c64c79482a6bedab219b86be345e Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Thu, 21 May 2026 18:06:25 +0100 Subject: [PATCH] debug: update proxy logs --- apps/tenant-router/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tenant-router/src/index.ts b/apps/tenant-router/src/index.ts index 132e8d75..d85f9c38 100644 --- a/apps/tenant-router/src/index.ts +++ b/apps/tenant-router/src/index.ts @@ -82,9 +82,9 @@ export default { redirect: 'manual' }); - if (isProxiedApiCall) { + if (isProxiedApiCall && upstreamResponse.status >= 400) { console.log( - `[proxy] ${request.method} ${url.pathname} → ${upstreamHost}${upstreamPath} status=${upstreamResponse.status} ct=${request.headers.get('content-type') ?? ''}` + `[proxy] ${request.method} ${url.pathname} → ${upstreamHost}${upstreamPath} status=${upstreamResponse.status} ct=${request.headers.get('content-type') ?? ''} upstream-cf-ray=${upstreamResponse.headers.get('cf-ray') ?? 'none'} upstream-server=${upstreamResponse.headers.get('server') ?? 'none'}` ); }