improved content types

This commit is contained in:
2025-01-21 01:23:41 -07:00
parent fcba2014c2
commit 1d3be78917
3 changed files with 3 additions and 3 deletions

View File

@@ -393,7 +393,7 @@ export class Router {
try {
const file = await Deno.readFile(normalizedPath);
const filetype = normalizedPath.split(".")[1];
const filetype = normalizedPath.split(".").at(-1);
const contentType = getContentTypeByExtension(filetype);
return new Response(file, { headers: { "Content-Type": contentType } });
} catch (e) {