pass max-age header on js bundle so cloudflare can cache it
This commit is contained in:
parent
221ae5b821
commit
8c43457622
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ async function redirectMiddleware(ctx, next) {
|
|||
request: { url },
|
||||
} = ctx;
|
||||
|
||||
if (STATIC_ASSET_PATHS.includes(url)) {
|
||||
if (STATIC_ASSET_PATHS.includes(url) || (url.startsWith('/public/ui-') && url.endsWith('.js'))) {
|
||||
ctx.set('Cache-Control', `public, max-age=${SIX_MONTHS_IN_SECONDS}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue