From a7724b7bc8f7c6dece9627052819346c278a5273 Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:20:45 +0000 Subject: [PATCH] Serve .json files as application/json. --- logserver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logserver.go b/logserver.go index 5e75173..5e18803 100644 --- a/logserver.go +++ b/logserver.go @@ -119,6 +119,9 @@ func extensionToMimeType(path string) string { return "image/jpeg" } + if strings.HasSuffix(path, ".json") { + return "application/json" + } return "application/octet-stream" }