From a46f3c50d16345d9c093ba8e6e62ae39c6c61d4b Mon Sep 17 00:00:00 2001 From: Paperclip Date: Fri, 27 Mar 2026 21:34:45 +0000 Subject: [PATCH] fix(web): scope devFetch interceptor to dev mode only (GRO-127) --- apps/web/src/lib/devFetch.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/web/src/lib/devFetch.ts b/apps/web/src/lib/devFetch.ts index 42078ce..02b974b 100644 --- a/apps/web/src/lib/devFetch.ts +++ b/apps/web/src/lib/devFetch.ts @@ -9,6 +9,9 @@ const originalFetch = window.fetch; * Intentionally mutates window.fetch — this is dev-only (AUTH_DISABLED=true). */ export function installDevFetchInterceptor() { + // In production, Better-Auth handles auth via cookies — no interception needed + if (!import.meta.env.DEV) return; + window.fetch = function (input: RequestInfo | URL, init?: RequestInit) { const user = getDevUser(); if (!user) return originalFetch(input, init);