Skip to content

Commit

Permalink
fix(playground): Do not cache index.html to prevent missing resource …
Browse files Browse the repository at this point in the history
…errors on version upgrades

Fixes #116
  • Loading branch information
paveltiunov committed Jun 10, 2019
1 parent 5325c2d commit 4f20955
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cubejs-server-core/core/DevServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,14 @@ class DevServer {
});
}));

app.use(serveStatic(path.join(__dirname, '../playground')));
app.use(serveStatic(path.join(__dirname, '../playground'), {
lastModified: false,
setHeaders: (res, url) => {
if (url.indexOf('/index.html') !== -1) {
res.setHeader('Cache-Control', 'no-cache');
}
}
}));
}
}

Expand Down

0 comments on commit 4f20955

Please sign in to comment.