Skip to content

Commit 55452f0

Browse files
committed
chore: update cache rule
1 parent 987a02f commit 55452f0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

apps/website/next.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ const nextConfig = {
1010
async headers() {
1111
return [
1212
{
13-
source: "/:path*",
13+
source: "/_next/static/:path*", // Static assets (JS, CSS, images)
14+
headers: [
15+
{
16+
key: "Cache-Control",
17+
value: "public, max-age=2592000, immutable",
18+
},
19+
],
20+
},
21+
{
22+
source: "/:path*", // HTML pages and other
1423
headers: [
1524
// {
1625
// key: "Referrer-Policy",
@@ -34,7 +43,7 @@ const nextConfig = {
3443
},
3544
{
3645
key: "Cache-Control",
37-
value: "public, max-age=2592000, s-maxage=5184000, stale-while-revalidate=59",
46+
value: "public, max-age=60, stale-while-revalidate=30",
3847
},
3948
],
4049
},

0 commit comments

Comments
 (0)