fix: use file-type for mime sniffing
This commit is contained in:
@@ -332,7 +332,7 @@ export async function createCanvasHostHandler(
|
||||
const mime =
|
||||
lower.endsWith(".html") || lower.endsWith(".htm")
|
||||
? "text/html"
|
||||
: (detectMime({ filePath }) ?? "application/octet-stream");
|
||||
: ((await detectMime({ filePath })) ?? "application/octet-stream");
|
||||
|
||||
res.setHeader("Cache-Control", "no-store");
|
||||
if (mime === "text/html") {
|
||||
|
||||
Reference in New Issue
Block a user