import { config } from '../config'; // For now, we'll use regular fetch without certificate support // This requires Vespa to be configured with token authentication // or to have a proxy that handles certificates export async function vespaFetch(url: string, options: RequestInit = {}) { // Since browser fetch doesn't support client certificates, // we'll need to either: // 1. Use token authentication (if configured in Vespa) // 2. Set up a proxy that handles certificates // 3. Use the Python backend as a proxy // For now, we'll attempt direct connection // This will work if Vespa is configured for public access or token auth return fetch(url, { ...options, headers: { ...options.headers, 'Accept': 'application/json', } }); }