From 9ac231bce785e769cc10fb362769b1f3c19a0154 Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Mon, 30 Mar 2026 15:50:51 +0000 Subject: [PATCH] fix: use same-origin default for auth URL instead of localhost Avoids ERR_CONNECTION_REFUSED in deployed environments where VITE_AUTH_URL is not set at build time. Empty-string fallback routes auth requests to same origin, which the HTTPRoute forwards to the auth service. cc @cpfarhood Co-Authored-By: Paperclip --- src/lib/auth-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/auth-client.ts b/src/lib/auth-client.ts index 3613ed4..70d7a61 100644 --- a/src/lib/auth-client.ts +++ b/src/lib/auth-client.ts @@ -28,7 +28,7 @@ const displayNameMapper: BetterFetchPlugin = { } export const authClient = createAuthClient({ - baseURL: import.meta.env.VITE_AUTH_URL ?? "http://localhost:3001", + baseURL: import.meta.env.VITE_AUTH_URL || "", basePath: "/auth", fetchPlugins: [displayNameMapper], })