From 2cb4c8c1bcc015ce5ab99525c7677afe51ce87a8 Mon Sep 17 00:00:00 2001 From: Arne Zeising Date: Tue, 23 Aug 2022 18:24:34 +0200 Subject: [PATCH] Update static.go --- static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static.go b/static.go index c66945c..aea41b0 100644 --- a/static.go +++ b/static.go @@ -102,7 +102,7 @@ func (h *uiAssetsHandler) serveFile(w http.ResponseWriter, path string) (code in // http.DetectContentType is using https://mimesniff.spec.whatwg.org/ which // will not recognize application/javascript for security reasons. if strings.HasSuffix(path, ".js") { - w.Header().Add("Content-Type", "application/javascript") + w.Header().Add("Content-Type", "application/javascript; charset=utf-8") } else { w.Header().Add("Content-Type", http.DetectContentType(bytes)) }