Skip to content

Commit

Permalink
Return mime type for json files
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Apr 9, 2024
1 parent e4c7e3f commit e11fc39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions logserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func extensionToMimeType(path string) string {
// re-educated.
return "text/plain; charset=utf-8"
}
if strings.HasSuffix(path, ".json") {
return "application/json"
}

if strings.HasSuffix(path, ".png") {
return "image/png"
Expand Down

0 comments on commit e11fc39

Please sign in to comment.