Skip to content

Commit 375c7b6

Browse files
authored
cache headers tweaks (#2520)
1 parent d0da8cb commit 375c7b6

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

next.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ export default withPlugins([withExpo, withImages, withFonts, withBundleAnalyzer]
5050
async headers() {
5151
return [
5252
{
53-
source: '/api/libraries',
54-
headers: [
55-
{ key: 'Access-Control-Allow-Origin', value: '*' },
56-
{ key: 'Access-Control-Allow-Methods', value: 'GET,HEAD' },
57-
],
53+
source: '/fonts/:path*',
54+
headers: [{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' }],
5855
},
5956
{
60-
source: '/fonts/:path*',
57+
source: '/favicon.:ext',
58+
headers: [{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' }],
59+
},
60+
{
61+
source: '/icon-:name.:ext',
6162
headers: [{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' }],
6263
},
6364
];

0 commit comments

Comments
 (0)