Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const props = {
template: "splash",
editUrl: false,
feedback: false,
noindex: true,
},
hideTitle: true,
hideBreadcrumbs: true,
Expand Down
1 change: 1 addition & 0 deletions src/pages/[product]/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const props = {
tableOfContents: false,
editUrl: false,
feedback: false,
noindex: true,
},
hideTitle: true,
hideBreadcrumbs: true,
Expand Down
9 changes: 8 additions & 1 deletion worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down