mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 19:33:24 +00:00
don't set cache header on serviceWorker.js
This commit is contained in:
@@ -18,8 +18,10 @@ routes(app);
|
||||
|
||||
app.use(
|
||||
express.static(path.resolve(__dirname, '../../dist/'), {
|
||||
setHeaders: function(res) {
|
||||
res.set('Cache-Control', 'public, max-age=31536000, immutable');
|
||||
setHeaders: function(res, path) {
|
||||
if (!/serviceWorker\.js$/.test(path)) {
|
||||
res.set('Cache-Control', 'public, max-age=31536000, immutable');
|
||||
}
|
||||
res.removeHeader('Pragma');
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user