We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc7dbc commit 2bdc8f2Copy full SHA for 2bdc8f2
react/server.js
@@ -92,10 +92,9 @@ module.exports = app.prepare().then(() => {
92
await next()
93
})
94
95
- // set default cache-control
96
- // but not for /_next/ paths, because HMR
+ // set default cache-control for most paths
97
server.use(async (ctx, next) => {
98
- if (!/\/_next\//.test(ctx.path)) {
+ if (!/(?:\/_next\/)|(?:\/static\/)/.test(ctx.path)) {
99
ctx.set('Cache-Control', 'public, max-age=5, s-maxage=31536000')
100
}
101
0 commit comments