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.
This commit is contained in:
@@ -29,8 +29,7 @@ export const verifyServerConnection = async (): Promise<{
|
|||||||
const response = await fetch(`${supabaseUrl}/auth/v1/${cacheParam}`, {
|
const response = await fetch(`${supabaseUrl}/auth/v1/${cacheParam}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'apikey': localStorage.getItem('supabase_key') || ''
|
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(8000)
|
signal: AbortSignal.timeout(8000)
|
||||||
});
|
});
|
||||||
@@ -109,8 +108,7 @@ export const verifySupabaseConnection = async (): Promise<{
|
|||||||
const response = await fetch(`${supabaseUrl}${path}${cacheParam}`, {
|
const response = await fetch(`${supabaseUrl}${path}${cacheParam}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'apikey': localStorage.getItem('supabase_key') || ''
|
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(8000)
|
signal: AbortSignal.timeout(8000)
|
||||||
});
|
});
|
||||||
@@ -139,8 +137,9 @@ export const verifySupabaseConnection = async (): Promise<{
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 호환성을 위한 더미 함수들
|
* 호환성을 위한 더미 함수들 - Cloud 환경에서는 항상 false를 반환
|
||||||
*/
|
*/
|
||||||
export const hasCorsIssue = (): boolean => false;
|
export const hasCorsIssue = (): boolean => false;
|
||||||
export const handleHttpUrlWithoutProxy = (): boolean => false;
|
export const handleHttpUrlWithoutProxy = (): boolean => true;
|
||||||
export const logProxyInfo = (): void => {};
|
export const logProxyInfo = (): void => {};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user