mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Cache html for one minute (#102)
This commit is contained in:
parent
f9aa9dc103
commit
57691fdb2b
@ -87,7 +87,7 @@ if (clientDistDirectory) {
|
||||
app.use(async (ctx, next) => {
|
||||
setStaticFileHeaders(ctx);
|
||||
await koaStatic(clientDistDirectory, {
|
||||
maxage: 365 * 24 * 60 * 60 * 1000 // one year in milliseconds
|
||||
maxage: ctx.req.url === '/' ? 60 * 1000 : 365 * 24 * 60 * 60 * 1000 // one minute in ms for html doc, one year for css, js, etc
|
||||
})(ctx, next);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user