TSXType = newMediaType("text", "tsx", []string{"tsx"})
JSXType = newMediaType("text", "jsx", []string{"jsx"})
- JSONType = newMediaType("application", "json", []string{"json"})
- RSSType = newMediaTypeWithMimeSuffix("application", "rss", "xml", []string{"xml"})
- XMLType = newMediaType("application", "xml", []string{"xml"})
- SVGType = newMediaTypeWithMimeSuffix("image", "svg", "xml", []string{"svg"})
- TextType = newMediaType("text", "plain", []string{"txt"})
- TOMLType = newMediaType("application", "toml", []string{"toml"})
- YAMLType = newMediaType("application", "yaml", []string{"yaml", "yml"})
+ JSONType = newMediaType("application", "json", []string{"json"})
+ WebAppManifestType = newMediaTypeWithMimeSuffix("application", "manifest", "json", []string{"webmanifest"})
+ RSSType = newMediaTypeWithMimeSuffix("application", "rss", "xml", []string{"xml"})
+ XMLType = newMediaType("application", "xml", []string{"xml"})
+ SVGType = newMediaTypeWithMimeSuffix("image", "svg", "xml", []string{"svg"})
+ TextType = newMediaType("text", "plain", []string{"txt"})
+ TOMLType = newMediaType("application", "toml", []string{"toml"})
+ YAMLType = newMediaType("application", "yaml", []string{"yaml", "yml"})
// Common image types
PNGType = newMediaType("image", "png", []string{"png"})
TSXType,
JSXType,
JSONType,
+ WebAppManifestType,
RSSType,
XMLType,
SVGType,
}
if !conf.DisableJSON {
addMinifier(m, mediaTypes, "json", &conf.Tdewolff.JSON)
- m.AddRegexp(regexp.MustCompile(`^(application|text)/(x-|ld\+)?json$`), &conf.Tdewolff.JSON)
+ m.AddRegexp(regexp.MustCompile(`^(application|text)/(x-|(ld|manifest)\+)?json$`), &conf.Tdewolff.JSON)
}
if !conf.DisableSVG {
addMinifier(m, mediaTypes, "svg", &conf.Tdewolff.SVG)