Skip to content

Commit b5a0fa5

Browse files
committed
[Docs Site] noindex index.md pages
1 parent 8245881 commit b5a0fa5

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
@@ -193,6 +193,7 @@ describe("Cloudflare Docs", () => {
193193
const response = await SELF.fetch(request);
194194

195195
expect(response.status).toBe(200);
196+
expect(response.headers.get("x-robots-tag")).toBe("noindex");
196197

197198
const text = await response.text();
198199
expect(text).toMatchInlineSnapshot(`

0 commit comments

Comments
 (0)