[Docs Site] noindex index.md pages (#24362)

This commit is contained in:
Kian 2025-08-18 15:59:28 +01:00 committed by GitHub
parent e8c917e677
commit d4f87053ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -72,6 +72,7 @@ export default class extends WorkerEntrypoint<Env> {
return new Response(markdown, {
headers: {
"content-type": "text/markdown; charset=utf-8",
"x-robots-tag": "noindex",
},
});
}

View file

@ -178,6 +178,7 @@ describe("Cloudflare Docs", () => {
const response = await SELF.fetch(request);
expect(response.status).toBe(200);
expect(response.headers.get("x-robots-tag")).toBe("noindex");
const text = await response.text();
expect(text).toMatchInlineSnapshot(`