]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
spk-spar-checker update header
authorAndreas Gerstenberg <gerstenberg@pixelpark.com>
Mon, 13 Nov 2017 10:25:18 +0000 (11:25 +0100)
committerAndreas Gerstenberg <gerstenberg@pixelpark.com>
Mon, 13 Nov 2017 10:25:18 +0000 (11:25 +0100)
customer/spk-spar-checker/production.yaml

index fa20661debf591c5993cf4e8be7f733654766a6a..054573f22332262db991fa046933ca03a9ea2e0e 100644 (file)
@@ -78,13 +78,43 @@ infra::profile::apache::pp_vhosts:
         directoryindex: 'index.html'
         custom_fragment: |
           AddType text/plain .tmpl
+
+              ## Configuration of the cache expiration
+              # Images and Fonts are versioned and should be cached 1 year
+              # JS and CSS are versioned, but should only be cached for 1 month
+              # The rest should not be cached
               ExpiresActive On
-              ExpiresDefault A0
-              <FilesMatch "\.(html|tmpl|js)$">
-                ExpiresDefault A0
-                Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
-                Header set Pragma "no-cache"
-              </FilesMatch>
+              ExpiresDefault                              A2592000
+
+              # Versioned assets
+              ExpiresByType image/png                     A31536000
+              ExpiresByType image/gif                     A31536000
+              ExpiresByType image/jpeg                    A31536000
+              ExpiresByType image/svg+xml                 A31536000
+              ExpiresByType application/x-font-ttf        A31536000
+              ExpiresByType application/x-font-truetype   A31536000
+              ExpiresByType application/x-font-opentype   A31536000
+              ExpiresByType application/font-sfnt         A31536000
+              ExpiresByType application/vnd.ms-fontobject A31536000
+              ExpiresByType application/font-woff         A31536000
+              ExpiresByType application/font-woff2        A31536000
+
+              # Versioned code
+              ExpiresByType text/css                      A2592000
+              ExpiresByType application/javascript        A2592000
+
+              # Not versioned assets
+              ExpiresByType application/manifest+json           A0
+              ExpiresByType text/plain                          A0
+              ExpiresByType text/html                           A0
+              ExpiresByType application/x-web-app-manifest+json A0
+              ExpiresByType text/cache-manifest                 A0
+              ExpiresByType application/json                    A0
+              ExpiresByType application/ld+json                 A0
+              ExpiresByType application/schema+json             A0
+              ExpiresByType application/vnd.geo+json            A0
+              ExpiresByType text/javascript                     A0
+              ExpiresByType text/xml                            A0
 
         rewrites:
           - comment: 'frontend root rewrite'