Skip to content

Commit

Permalink
Merge pull request #1 from Dartegnian/fix/svg-mimetype
Browse files Browse the repository at this point in the history
Add support for SVG and include proper Content-Type
  • Loading branch information
Dartegnian authored Mar 24, 2024
2 parents 65a826b + 4fb62f8 commit 08b1613
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 08b1613

Please sign in to comment.