Skip to content

Commit

Permalink
Add more mimetypes (#385)
Browse files Browse the repository at this point in the history

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
  • Loading branch information
roidelapluie committed Jun 17, 2022
1 parent 627089d commit 26d4974
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions server/static_file_server.go
Expand Up @@ -19,11 +19,23 @@ import (
)

var mimeTypes = map[string]string{
".js": "application/javascript",
".css": "text/css",
".png": "image/png",
".jpg": "image/jpeg",
".gif": "image/gif",
".cjs": "application/javascript",
".css": "text/css",
".eot": "font/eot",
".gif": "image/gif",
".ico": "image/x-icon",
".jpg": "image/jpeg",
".js": "application/javascript",
".json": "application/json",
".less": "text/plain",
".map": "application/json",
".otf": "font/otf",
".png": "image/png",
".svg": "image/svg+xml",
".ttf": "font/ttf",
".txt": "text/plain",
".woff": "font/woff",
".woff2": "font/woff2",
}

func StaticFileServer(root http.FileSystem) http.Handler {
Expand Down

0 comments on commit 26d4974

Please sign in to comment.