Skip to content

Commit

Permalink
Add support for SVG and include proper Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartegnian committed Mar 24, 2024
1 parent f134a36 commit 4fb62f8
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 4fb62f8

Please sign in to comment.