瀏覽代碼

add svg mime type

master
Martin Dørum 4 年之前
父節點
當前提交
a034d1f1f7
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      server/filesrv.js

+ 2
- 0
server/filesrv.js 查看文件

@@ -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 });

Loading…
取消
儲存