forked from cartsnitch/cartsnitch
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:
committed by
cartsnitch-ci[bot]
parent
30d670a257
commit
2c64ab9e98
@@ -1,7 +1,7 @@
|
||||
import { createAuthClient } from "better-auth/react"
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: import.meta.env.VITE_AUTH_URL ?? "http://localhost:3001",
|
||||
baseURL: import.meta.env.VITE_AUTH_URL || "",
|
||||
basePath: "/auth",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user