Skip to content

Commit

Permalink
Serve .json files as application/json.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkaye committed Feb 8, 2022
1 parent 53e8947 commit a7724b7
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 @@ -119,6 +119,9 @@ func extensionToMimeType(path string) string {
return "image/jpeg"
}

if strings.HasSuffix(path, ".json") {
return "application/json"
}
return "application/octet-stream"
}

Expand Down

0 comments on commit a7724b7

Please sign in to comment.