github.com/chwjbn/xclash@v0.2.0/constant/mime/mime.go (about)

     1  package mime
     2  
     3  import (
     4  	"mime"
     5  )
     6  
     7  var consensusMimes = map[string]string{
     8  	// rfc4329: text/javascript is obsolete, so we need to overwrite mime's builtin
     9  	".js": "application/javascript; charset=utf-8",
    10  }
    11  
    12  func init() {
    13  	for ext, typ := range consensusMimes {
    14  		mime.AddExtensionType(ext, typ)
    15  	}
    16  }