From: Andreas Gerstenberg Date: Fri, 10 Nov 2017 13:51:51 +0000 (+0100) Subject: spk-spar-checker add ExpiresByType X-Git-Tag: v0.1.0~2088 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=a2604fa83e7cd44d956e28850895705ddd92d37e;p=pixelpark%2Fhiera.git spk-spar-checker add ExpiresByType --- diff --git a/customer/spk-spar-checker/test.yaml b/customer/spk-spar-checker/test.yaml index a99d4dea..19411680 100644 --- a/customer/spk-spar-checker/test.yaml +++ b/customer/spk-spar-checker/test.yaml @@ -104,13 +104,42 @@ 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 - - ExpiresDefault A0 - Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform" - Header set Pragma "no-cache" - + 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'