Closed dickeylth closed 7 years ago
https://github.com/koajs/static-cache/blob/master/index.js#L200
obj.type = obj.mime = mime.lookup(pathname) || 'application/octet-stream'
The code logic here is using mime-types to check the corresponding mime type for filepath, however if I want to customize mime type for specific extname, I guess it's unavailable currently?
mime-types
extname
yes, but you can add a middleware to reset content-type after static-cache middleware.
https://github.com/koajs/static-cache/blob/master/index.js#L200
The code logic here is using
mime-types
to check the corresponding mime type for filepath, however if I want to customize mime type for specificextname
, I guess it's unavailable currently?