diff --git a/consts/mime_types.go b/consts/mime_types.go index 0ce83d310..c05a08638 100644 --- a/consts/mime_types.go +++ b/consts/mime_types.go @@ -57,4 +57,8 @@ func init() { for ext, typ := range imageFormats { _ = mime.AddExtensionType(ext, typ) } + + // In some circumstances, Windows sets JS mime-type to `text/plain`! + _ = mime.AddExtensionType(".js", "text/javascript") + _ = mime.AddExtensionType(".css", "text/css") }