Prevent caching of store status updates
This commit is contained in:
parent
a3b8593133
commit
7c42800245
@ -63,7 +63,7 @@ app.use('/api', apiRouter);
|
||||
const staticCacheOptions = {
|
||||
maxAge: process.env.NODE_ENV === 'production' ? '30d' : 0,
|
||||
setHeaders: (res, filePath) => {
|
||||
if (filePath.endsWith('.html')) {
|
||||
if (filePath.endsWith('.html') || filePath.endsWith('update.json')) {
|
||||
res.setHeader('Cache-Control', 'no-store');
|
||||
} else if (/\.(js|css|svg|ico|png|jpg|jpeg|webp|avif|woff2?)$/i.test(filePath)) {
|
||||
res.setHeader('Cache-Control', 'public, max-age=2592000, immutable');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user