Skip to content
Merged
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export default class extends WorkerEntrypoint<Env> {
const res = await this.env.ASSETS.fetch(htmlUrl, request);

if (res.status === 404) {
const redirect = await redirectsEvaluator(
new Request(htmlUrl, request),
this.env.ASSETS,
);

if (redirect) {
return new Response(redirect.url + "index.md", redirect);
}

return res;
}

Expand Down
Loading