From 3bf1bb9c64e01806780ed5e50f0733087cf06b48 Mon Sep 17 00:00:00 2001 From: Jimil Date: Sun, 13 Sep 2026 00:50:20 +0530 Subject: [PATCH] chore: add console log for API Endpoint resolution --- frontend/src/api.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 2b7a300..365ec6e 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -24,6 +24,8 @@ const isLocal = rawHost?.startsWith('localhost') || rawHost?.startsWith('127.0.0 const API_HOST = rawHost && !rawHost.includes('.') && !isLocal ? `${rawHost}.onrender.com` : rawHost const API_ROOT = API_HOST ? (isLocal ? `http://${API_HOST}` : `https://${API_HOST}`) : '' +console.log('[SettleUp] API Endpoint configured as:', API_ROOT || '(relative / same-origin)') + /** Absolute URL for an API path, used for links the browser follows directly (e.g. CSV export). */ export function apiUrl(path: string): string { return `${API_ROOT}/api${path}`