validate service worker on every request

This commit is contained in:
keyan 2023-08-07 16:36:02 -05:00
parent a3b668587d
commit 7967891e99
1 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,15 @@ module.exports = withPlausibleProxy()({
...corsHeaders
]
},
// never cache service worker
// https://stackoverflow.com/questions/38843970/service-worker-javascript-update-frequency-every-24-hours/38854905#38854905
{
source: '/sw.js',
headers: [{
key: 'Cache-Control',
value: 'no-cache'
}]
},
{
source: '/api/lnauth',
headers: [