configuration-templates – Blame information for rev 5

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