configuration-templates – Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 office 1 ########################################################################
2 # deflate #
3 ########################################################################
4  
5 <IfModule mod_deflate.c>
6  
7 # Force compression for mangled `Accept-Encoding` request headers
8 # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
9  
10 <IfModule mod_setenvif.c>
11 <IfModule mod_headers.c>
12 SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
13 RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
14 </IfModule>
15 </IfModule>
16  
17 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18  
19 # Compress all output labeled with one of the following media types.
20 #
21 # (!) For Apache versions below version 2.3.7 you don't need to
22 # enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
23 # and `</IfModule>` lines as `AddOutputFilterByType` is still in
24 # the core directives.
25 #
26 # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
27  
28 <IfModule mod_filter.c>
29 AddOutputFilterByType DEFLATE "application/atom+xml" \
30 "application/javascript" \
31 "application/json" \
32 "application/ld+json" \
33 "application/manifest+json" \
34 "application/rdf+xml" \
35 "application/rss+xml" \
36 "application/schema+json" \
37 "application/vnd.geo+json" \
38 "application/vnd.ms-fontobject" \
39 "application/x-font-ttf" \
40 "application/x-javascript" \
41 "application/x-web-app-manifest+json" \
42 "application/xhtml+xml" \
43 "application/xml" \
44 "font/eot" \
45 "font/opentype" \
46 "image/bmp" \
47 "image/svg+xml" \
48 "image/vnd.microsoft.icon" \
49 "image/x-icon" \
50 "text/cache-manifest" \
51 "text/css" \
52 "text/html" \
53 "text/javascript" \
54 "text/plain" \
55 "text/vcard" \
56 "text/vnd.rim.location.xloc" \
57 "text/vtt" \
58 "text/x-component" \
59 "text/x-cross-domain-policy" \
60 "text/xml"
61  
62 </IfModule>
63  
64 # Map the following filename extensions to the specified
65 # encoding type in order to make Apache serve the file types
66 # with the appropriate `Content-Encoding` response header
67 # (do note that this will NOT make Apache compress them!).
68 #
69 # If these files types would be served without an appropriate
70 # `Content-Enable` response header, client applications (e.g.:
71 # browsers) wouldn't know that they first need to uncompress
72 # the response, and thus, wouldn't be able to understand the
73 # content.
74 #
75 # https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
76  
77 <IfModule mod_mime.c>
78 AddEncoding gzip svgz
79 </IfModule>
80  
81 </IfModule>