diff options
-rw-r--r-- | src/app.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/app.ts b/src/app.ts index da339c0..e6f82a3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -163,7 +163,11 @@ export const server = { const file = files.get(pathname); let contentEncoding = "identity"; let suffix = ""; - if (file && (await file.handle.exists())) { + if ( + !pathname.startsWith("/404.html") && + file && + (await file.handle.exists()) + ) { let etagMatch = request.headers.get("if-none-match") === file.etag; let mtimeMatch = parseIfModifiedSinceHeader( |