Browse Source
Add support for SVG and include proper Content-Type
pull/935/head
Dartegnian
2 years ago
No known key found for this signature in database
GPG Key ID: 233607936C0107BD
1 changed files with
1 additions and
0 deletions
-
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, |
|
|
|
|