diff --git a/src/lib/searxng.ts b/src/lib/searxng.ts index 87767e098..9d31bda0d 100644 --- a/src/lib/searxng.ts +++ b/src/lib/searxng.ts @@ -44,6 +44,13 @@ export const searchSearxng = async ( try { const res = await fetch(url, { signal: controller.signal, + headers: { + // SearXNG's default botdetection rejects requests that do not identify + // an origin IP. Server-side searches from Vane do not have a browser + // proxy adding these headers, so provide a loopback address explicitly. + 'X-Forwarded-For': '127.0.0.1', + 'X-Real-IP': '127.0.0.1', + }, }); if (!res.ok) {