mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 06:05:41 -04:00
feat: add support for additional mime types and default file type
This commit is contained in:
@@ -1107,13 +1107,18 @@ const server = http.createServer( ( request, response ) =>
|
|||||||
? 'text/plain'
|
? 'text/plain'
|
||||||
: {
|
: {
|
||||||
'.html' : 'text/html',
|
'.html' : 'text/html',
|
||||||
|
'.htm' : 'text/html',
|
||||||
'.ico' : 'image/x-icon',
|
'.ico' : 'image/x-icon',
|
||||||
'.jpg' : 'image/jpeg',
|
'.jpg' : 'image/jpeg',
|
||||||
'.png' : 'image/png',
|
'.png' : 'image/png',
|
||||||
'.gif' : 'image/gif',
|
'.gif' : 'image/gif',
|
||||||
'.css' : 'text/css',
|
'.css' : 'text/css',
|
||||||
'.gz' : 'application/gzip',
|
'.gz' : 'application/gzip',
|
||||||
'.js' : 'text/javascript'
|
'.js' : 'text/javascript',
|
||||||
|
'.txt' : 'text/plain',
|
||||||
|
'.xml' : 'application/xml',
|
||||||
|
'.m3u' : 'text/plain',
|
||||||
|
'.m3u8' : 'text/plain'
|
||||||
}[loadFile.substring( fileExt )];
|
}[loadFile.substring( fileExt )];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user