improved content types
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user