nico/26-feb-26/fix-seed #4

Merged
nicoarya20 merged 2 commits from nico/26-feb-26/fix-seed into main 2026-02-26 16:31:22 +08:00
Showing only changes of commit 5d9be8c479 - Show all commits

View File

@@ -21,7 +21,11 @@ export const getEnv = (key: string, defaultValue = ""): string => {
};
export const VITE_PUBLIC_URL = (() => {
const envUrl = getEnv("VITE_PUBLIC_URL");
// Priority:
// 1. BETTER_AUTH_URL (standard for better-auth)
// 2. VITE_PUBLIC_URL (our app standard)
// 3. window.location.origin (browser fallback)
const envUrl = getEnv("BETTER_AUTH_URL") || getEnv("VITE_PUBLIC_URL");
if (envUrl) return envUrl;
// Fallback for browser