Spaces:
Running
Running
File size: 781 Bytes
5dfbe50 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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',
}
});
} |