Skip to content

Commit

Permalink
Update static.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneZsng authored and hibiken committed Dec 18, 2022
1 parent 3f4e761 commit 2cb4c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 2cb4c8c

Please sign in to comment.