From 609c6703ccac2516990dca4d56d16bc150598b73 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 06:16:40 +0000 Subject: [PATCH] Refactor network utils for Cloud Refactor src/utils/auth/network/networkUtils.ts to remove unnecessary code and simplify it for Supabase Cloud environment, especially cleaning up CORS proxy-related code. --- src/utils/auth/network/networkUtils.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utils/auth/network/networkUtils.ts b/src/utils/auth/network/networkUtils.ts index 7a8dae2..6417af4 100644 --- a/src/utils/auth/network/networkUtils.ts +++ b/src/utils/auth/network/networkUtils.ts @@ -29,8 +29,7 @@ export const verifyServerConnection = async (): Promise<{ const response = await fetch(`${supabaseUrl}/auth/v1/${cacheParam}`, { method: 'GET', headers: { - 'Content-Type': 'application/json', - 'apikey': localStorage.getItem('supabase_key') || '' + 'Content-Type': 'application/json' }, signal: AbortSignal.timeout(8000) }); @@ -109,8 +108,7 @@ export const verifySupabaseConnection = async (): Promise<{ const response = await fetch(`${supabaseUrl}${path}${cacheParam}`, { method: 'GET', headers: { - 'Content-Type': 'application/json', - 'apikey': localStorage.getItem('supabase_key') || '' + 'Content-Type': 'application/json' }, signal: AbortSignal.timeout(8000) }); @@ -139,8 +137,9 @@ export const verifySupabaseConnection = async (): Promise<{ }; /** - * 호환성을 위한 더미 함수들 + * 호환성을 위한 더미 함수들 - Cloud 환경에서는 항상 false를 반환 */ export const hasCorsIssue = (): boolean => false; -export const handleHttpUrlWithoutProxy = (): boolean => false; +export const handleHttpUrlWithoutProxy = (): boolean => true; export const logProxyInfo = (): void => {}; +