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 <noreply@paperclip.ing>
This commit is contained in:
@@ -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],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user