Add redirect option to fetch notFoundUrl

This commit is contained in:
New Future
2026-01-13 23:42:06 +08:00
committed by GitHub
parent f76bb2cda5
commit 9000cccdb4
+1 -1
View File
@@ -207,7 +207,7 @@ async function handleRequest(request) {
}
try {
const notFoundResponse = await fetch(notFoundUrl.toString());
const notFoundResponse = await fetch(notFoundUrl.toString(), { redirect: 'follow' });
if (notFoundResponse.ok) {
// Return 404.html with 404 status code and appropriate headers