Commit 7adde422 authored by Sebastien Chopin's avatar Sebastien Chopin

Add cache for static/

parent 1c1aa145
......@@ -9,10 +9,10 @@ module.exports = {
titleTemplate: 'Nuxt HN | %s'
},
loading: {
color: '#ff6600'
color: '#66e8ad'
},
manifest: {
theme_color: '#41B883'
theme_color: '#41b883'
},
modules: [
'@nuxtjs/pwa',
......@@ -20,5 +20,15 @@ module.exports = {
],
plugins: [
'~plugins/filters.js'
]
],
render: {
static: {
maxAge: '1y',
setHeaders: function (res, path) {
if (path.includes('sw.js') || path.includes('workbox-sw.')) {
res.setHeader('Cache-Control', 'public, max-age=0')
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment