Pārlūkot izejas kodu

add svg mime type

master
Martin Dørum pirms 4 gadiem
vecāks
revīzija
a034d1f1f7
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2
    0
      server/filesrv.js

+ 2
- 0
server/filesrv.js Parādīt failu

@@ -50,6 +50,8 @@ module.exports = function createFileServer(webroot) {
ctype = "application/javascript";
else if (path.endsWith(".css"))
ctype = "text/css";
else if (path.endsWith(".svg"))
ctype = "image/svg+xml";

if (ctype)
res.writeHead(200, { "Content-Type": ctype });

Notiek ielāde…
Atcelt
Saglabāt