Skip to content

Commit 64bf5ea

Browse files
authored
Add 24 hour caching of public images (#1777)
1 parent 8ef7a21 commit 64bf5ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

frontend/next.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ let app = removeImports({
6464
},
6565
],
6666
},
67+
{
68+
// cache images for 24 hours
69+
source: "/:all*(png|jpg|jpeg|gif|svg|ico|webp)",
70+
headers: [
71+
{
72+
key: "Cache-Control",
73+
value: "public, max-age=86400, stale-while-revalidate=86400",
74+
},
75+
],
76+
},
6777
];
6878
},
6979
webpack(config) {

0 commit comments

Comments
 (0)