about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index f423b01..8b8ab0b 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -66,7 +66,10 @@ async function serveFile(
 ): Promise<Response> {
   if (file && (await fsp.exists(file.filename))) {
     return new Response(Bun.file(file.filename), {
-      headers: file.headers || defaultHeaders,
+      headers: {
+        "last-modified": file.mtime,
+        ...(file.headers || defaultHeaders),
+      },
       status: statusCode,
     });
   } else {