From c4c07583c3306136a422a8324c85ca136c923b70 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 20 Aug 2024 21:37:41 -0400 Subject: [PATCH] docs: Black-hole zombie pages --- .cloudflare/docs-proxy/src/worker.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.cloudflare/docs-proxy/src/worker.js b/.cloudflare/docs-proxy/src/worker.js index f9f441883a..b29ddc00f1 100644 --- a/.cloudflare/docs-proxy/src/worker.js +++ b/.cloudflare/docs-proxy/src/worker.js @@ -3,6 +3,15 @@ export default { const url = new URL(request.url); url.hostname = "docs-anw.pages.dev"; + // These pages were removed, but may still be served due to Cloudflare's + // [asset retention](https://developers.cloudflare.com/pages/configuration/serving-pages/#asset-retention). + if ( + url.pathname === "/docs/assistant/context-servers" || + url.pathname === "/docs/assistant/model-context-protocol" + ) { + return await fetch("https://zed.dev/404"); + } + let res = await fetch(url, request); if (res.status === 404) {