Force correct mime-type for JS and CSS files

This commit is contained in:
Deluan 2022-02-08 15:17:35 -05:00 committed by Joe Stump
parent 97369cba16
commit e58aaf3f5d
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -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")
}