Update default API URL

Update the default Supabase API URL to http://a11.ism.kr.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 15:20:26 +00:00
parent 0f07edaa98
commit 9e7cd1f074
3 changed files with 39 additions and 5 deletions

View File

@@ -16,7 +16,12 @@ export const signInWithDirectApi = async (email: string, password: string) => {
? supabaseUrl
: `${supabaseUrl}/auth/v1`;
const tokenUrl = `${baseUrl}/token?grant_type=password`;
// URL에 중복 '/auth/v1' 경로가 있는지 확인하고 수정
const normalizedUrl = baseUrl.includes('/auth/v1/auth/v1')
? baseUrl.replace('/auth/v1/auth/v1', '/auth/v1')
: baseUrl;
const tokenUrl = `${normalizedUrl}/token?grant_type=password`;
const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${supabase.supabaseKey}`,
@@ -48,7 +53,7 @@ export const signInWithDirectApi = async (email: string, password: string) => {
console.warn('API 경로를 찾을 수 없음 (404). 새 엔드포인트 시도 중...');
// 대체 엔드포인트 시도 (/token 대신 /signin)
const signinUrl = `${baseUrl}/signin`;
const signinUrl = `${normalizedUrl}/signin`;
try {
const signinResponse = await fetch(signinUrl, {