add mime information to universal path; include content type in static server
This commit is contained in:
@@ -38,6 +38,7 @@ export default class FileResponseFactory extends ResponseFactory {
|
||||
if ( content.headers && content.body && length ) {
|
||||
request.response.body = content.body
|
||||
request.response.headers.set('Content-Length', length)
|
||||
request.response.headers.set('Content-Type', path.content_type)
|
||||
} else {
|
||||
this.logger.debug(`Tried to serve file that does not exist: ${path}`)
|
||||
request.response.status = HTTPStatus.NOT_FOUND
|
||||
|
||||
Reference in New Issue
Block a user