From fefee9721dc9775a2a661fca0b2f627869d4fde7 Mon Sep 17 00:00:00 2001 From: Vic Demuzere Date: Sun, 26 Sep 2021 15:37:24 +0200 Subject: [PATCH] Add missing Content-Type header for index Serving the page without Content-Type seems to work but confuses the view-source mode in Firefox. --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index decee81..23a81e5 100644 --- a/main.go +++ b/main.go @@ -113,6 +113,7 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { return } + w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Referrer-Policy", "no-referrer") w.Header().Set("X-Frame-Options", "DENY") w.Header().Set("X-Xss-Protection", "1; mode=block")