Files
zellyy-finance/src/archive/lib/supabase/config.ts

31 lines
845 B
TypeScript

// Supabase Cloud URL과 anon key 설정
export const getSupabaseUrl = () => {
const url = import.meta.env.VITE_SUPABASE_URL;
if (!url) throw new Error("VITE_SUPABASE_URL is not set");
return url;
};
export const getSupabaseKey = () => {
const key = import.meta.env.VITE_SUPABASE_ANON_KEY;
if (!key) throw new Error("VITE_SUPABASE_ANON_KEY is not set");
return key;
};
// Supabase 키 유효성 검사 - Cloud 환경에서는 항상 유효함
export const isValidSupabaseKey = () => {
return Boolean(import.meta.env.VITE_SUPABASE_ANON_KEY);
};
// 다음 함수들은 Cloud 환경에서는 필요 없지만 호환성을 위해 유지
export const isCorsProxyEnabled = () => {
return false;
};
export const getProxyType = () => {
return 'none';
};
export const getOriginalSupabaseUrl = () => {
return getSupabaseUrl();
};