We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 223494b commit 0901981Copy full SHA for 0901981
src/serverCompress/util.go
@@ -9,16 +9,19 @@ var compressibleTypes = []string{
9
"application/javascript",
10
"application/x-javascript",
11
"application/json",
12
- "application/xhtml+xml",
13
"application/xml",
14
- "image/svg+xml",
15
}
16
17
func isCompressibleType(contentType string) bool {
18
if strings.HasPrefix(contentType, "text/") {
19
return true
20
21
+ // "image/svg+xml", "application/xhtml+xml", ...
+ if strings.HasSuffix(contentType, "+xml") {
22
+ return true
23
+ }
24
+
25
sepIndex := strings.IndexByte(contentType, ';')
26
if sepIndex > 0 {
27
contentType = contentType[:sepIndex]
0 commit comments