From 4fb62f86ea3e5e7425109f2c093ee4a3a307d081 Mon Sep 17 00:00:00 2001 From: Dartegnian Date: Sun, 24 Mar 2024 15:49:32 +0800 Subject: [PATCH] Add support for SVG and include proper Content-Type --- src/lib/Server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/Server.js b/src/lib/Server.js index 18e015cb6..3e5e306d5 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -230,6 +230,7 @@ module.exports = class Server { if (id.endsWith('.json')) setHeader(event, 'Content-Type', 'application/json'); if (id.endsWith('.css')) setHeader(event, 'Content-Type', 'text/css'); if (id.endsWith('.png')) setHeader(event, 'Content-Type', 'image/png'); + if (id.endsWith('.svg')) setHeader(event, 'Content-Type', 'image/svg+xml'); return { size: stats.size,