mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-11 20:06:58 +00:00
[Docs Site] Add noindex to 404 pages (#23665)
This commit is contained in:
parent
4f708ee9a1
commit
2c4a8818ea
3 changed files with 10 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ const props = {
|
|||
template: "splash",
|
||||
editUrl: false,
|
||||
feedback: false,
|
||||
noindex: true,
|
||||
},
|
||||
hideTitle: true,
|
||||
hideBreadcrumbs: true,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const props = {
|
|||
tableOfContents: false,
|
||||
editUrl: false,
|
||||
feedback: false,
|
||||
noindex: true,
|
||||
},
|
||||
hideTitle: true,
|
||||
hideBreadcrumbs: true,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,14 @@ export default class extends WorkerEntrypoint<Env> {
|
|||
|
||||
if (!section) return response;
|
||||
|
||||
return this.env.ASSETS.fetch(`http://fakehost/${section}/404/`);
|
||||
const notFoundResponse = await this.env.ASSETS.fetch(
|
||||
`http://fakehost/${section}/404/`,
|
||||
);
|
||||
|
||||
return new Response(notFoundResponse.body, {
|
||||
status: 404,
|
||||
headers: notFoundResponse.headers,
|
||||
});
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue