From 869fd18d4225849c46048270ebef1f242d89279c Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 10 Mar 2026 19:36:13 -0700 Subject: [PATCH] Use redirect: manual to let browser handle redirects Bun's fetch was following Go's 303 redirects internally, which caused ECONNRESET errors during the auto-login redirect chain. Let the browser handle redirects instead. Co-Authored-By: Claude Opus 4.6 --- src/proxy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proxy.ts b/src/proxy.ts index 39e30ed..f84a536 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -28,6 +28,7 @@ export function createProxy(isHealthy: () => boolean, isRunning: () => boolean) method: req.method, headers: req.headers, body, + redirect: 'manual', }).then((r) => { // Bun auto-decompresses gzip but leaves content-encoding header. // Strip it so the next proxy layer doesn't try to decompress again.