diff options
author | Alan Pearce | 2023-09-13 06:36:39 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-13 06:36:39 +0200 |
commit | 7c376d43ed17ffb44933f3ac8c1c8b8590dd675e (patch) | |
tree | 765f956e1a58b5a64063ae3a69deffd9c889c266 /src/index.ts | |
parent | a5e05c9241c8c6e7f0a8ce54fecdbb7df3c1ecec (diff) | |
download | website-7c376d43ed17ffb44933f3ac8c1c8b8590dd675e.tar.lz website-7c376d43ed17ffb44933f3ac8c1c8b8590dd675e.tar.zst website-7c376d43ed17ffb44933f3ac8c1c8b8590dd675e.zip |
Send last-modified header
Diffstat (limited to 'src/index.ts')
-rw-r--r-- | src/index.ts | 5 |
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 { |