Force correct mime-type for JS and CSS files

This commit is contained in:
Deluan 2022-02-08 15:17:35 -05:00
parent 86fe1e3b2c
commit e966d94c0b
1 changed files with 4 additions and 0 deletions

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