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'