diff --git a/lib/api.ts b/lib/api.ts index 8a77bcb..59e3fc1 100644 --- a/lib/api.ts +++ b/lib/api.ts @@ -21,7 +21,7 @@ export async function limqRequest( throw new Error('No active session. User must be authenticated.'); } - const baseUrl = process.env.NEXT_PUBLIC_LIMQ_API || 'http://localhost:3005'; + const baseUrl = process.env.NEXT_PUBLIC_LIMQ_API; const url = `${baseUrl}${endpoint.startsWith('/') ? endpoint : '/' + endpoint}`; const options: RequestInit = { @@ -29,7 +29,8 @@ export async function limqRequest( headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${session.access_token}` - } + }, + mode: 'cors' }; if (data && (method === 'POST' || method === 'PUT')) {