solved MIME type warnings

This commit is contained in:
catvayor 2023-06-11 17:30:57 +02:00
parent 93be3718c5
commit 84ca690684

View file

@ -90,6 +90,9 @@ var server = http.createServer(option, function(req, res){
res.writeHead(404, {'Content-Type': 'text/html'});
return res.end("404 Not Found");
}
if(filename.endsWith('.js'))
res.writeHead(200, {'Content-Type': 'text/javascript'});
else
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(data);
return res.end();