diff --git a/.gitignore b/.gitignore index 901153c..41e9d0b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ llm-docs/ .env.production.local *.draft .cursorignore +.playwright-mcp/ npm-debug.log* yarn-debug.log* diff --git a/worker/index.js b/worker/index.js index 797dfa7..0036b4d 100644 --- a/worker/index.js +++ b/worker/index.js @@ -63,6 +63,11 @@ async function handleRequest(request) { for (const route of ROUTES) { if (matchesRoute(url.pathname, route.prefix)) { + // Docs sites don't serve robots.txt; block stale cached copies + if (url.pathname.endsWith('/robots.txt')) { + return new Response('', { status: 404 }); + } + url.hostname = route.target; const response = await fetch(new Request(url, request), { cf: { cacheEverything: true } });