Skip to content

Commit 0b44720

Browse files
committed
Add caching headers
1 parent ba4f869 commit 0b44720

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

next.config.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
/** @type {import('next').NextConfig} */
2+
23
module.exports = {
34
reactStrictMode: true,
45
images: {
56
domains: ["cdn.discordapp.com", "discord.com", "i.imgur.com"],
67
minimumCacheTTL: 3600
78
},
8-
poweredByHeader: false
9+
poweredByHeader: false,
10+
async headers() {
11+
return [
12+
{
13+
source: "/img/:all*(svg|jpg|png)",
14+
locale: false,
15+
headers: [
16+
{
17+
key: "Cache-Control",
18+
value: "public, max-age=28800",
19+
}
20+
],
21+
},
22+
{
23+
source: "/favicon.ico",
24+
locale: false,
25+
headers: [
26+
{
27+
key: "Cache-Control",
28+
value: "public, max-age=86400",
29+
}
30+
],
31+
},
32+
]
33+
},
934
}

0 commit comments

Comments
 (0)