mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-25 09:37:35 +00:00
fix(shell): use shell provided mime
This commit is contained in:
parent
784966e4cc
commit
6556b8b601
@ -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) =>
|
||||
|
Loading…
Reference in New Issue
Block a user