Skip to content

Commit d4f8705

Browse files
authored
[Docs Site] noindex index.md pages (#24362)
1 parent e8c917e commit d4f8705

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

worker/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default class extends WorkerEntrypoint<Env> {
7272
return new Response(markdown, {
7373
headers: {
7474
"content-type": "text/markdown; charset=utf-8",
75+
"x-robots-tag": "noindex",
7576
},
7677
});
7778
}

worker/index.worker.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ describe("Cloudflare Docs", () => {
178178
const response = await SELF.fetch(request);
179179

180180
expect(response.status).toBe(200);
181+
expect(response.headers.get("x-robots-tag")).toBe("noindex");
181182

182183
const text = await response.text();
183184
expect(text).toMatchInlineSnapshot(`

0 commit comments

Comments
 (0)