/** * Returns the appropriate API URL based on context: * - Server-side (SSR): Uses internal Docker network URL * - Client-side: Uses public URL */ export function useApiUrl(): string { const config = useRuntimeConfig() if (import.meta.server) { // Server-side: use internal URL for Docker networking return config.apiUrlInternal as string } // Client-side: use public URL return config.public.apiUrl as string }