From 6556b8b60146ecf12bd588ef8c46a96c009a61c4 Mon Sep 17 00:00:00 2001 From: Il Harper Date: Sat, 7 Sep 2024 14:11:24 +0800 Subject: [PATCH] fix(shell): use shell provided mime --- packages/shell/src/satori/routes/assets.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/shell/src/satori/routes/assets.ts b/packages/shell/src/satori/routes/assets.ts index e45dc07..5f9bebb 100644 --- a/packages/shell/src/satori/routes/assets.ts +++ b/packages/shell/src/satori/routes/assets.ts @@ -1,4 +1,3 @@ -import { getType } from 'mime/lite' import { createReadStream } from 'node:fs' import type { RouteContext } from './types' @@ -30,7 +29,7 @@ export const assets = async ({ } res.statusCode = 200 - res.setHeader('Content-Type', getType(path)!) + res.setHeader('Content-Type', cctx.chronocat.mime.getType(path)!) const readStream = createReadStream(path) await new Promise((resolve, reject) =>