Merge pull request #428 from nolanlawson/cache-control-service-worker

Set service-worker max-age to 0
This commit is contained in:
Rich Harris
2018-09-08 10:20:04 -04:00
committed by GitHub

View File

@@ -141,12 +141,12 @@ export default function middleware(opts: {
fs.existsSync(path.join(output, 'service-worker.js')) && serve({
pathname: '/service-worker.js',
cache_control: 'max-age=600'
cache_control: 'no-cache, no-store, must-revalidate'
}),
fs.existsSync(path.join(output, 'service-worker.js.map')) && serve({
pathname: '/service-worker.js.map',
cache_control: 'max-age=600'
cache_control: 'no-cache, no-store, must-revalidate'
}),
serve({