Skip to content

Commit

Permalink
Add cache control headers for woff2 files
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Feb 28, 2024
1 parent 34a2048 commit 9b53ce0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
14 changes: 14 additions & 0 deletions website/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ const nextConfig = {
async redirects() {
return redirects
},
async headers() {
return [
{
source: '/:all*(woff2)',
locale: false,
headers: [
{
'key': 'Cache-Control',
'value': 'public, max-age=31536000'
}
],
},
]
},
images: {
formats: ['image/avif', 'image/webp'],
remotePatterns: [
Expand Down
13 changes: 1 addition & 12 deletions website/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,5 @@
"app/api/generate-page-cache/route.ts": {
"memory": 3008
}
},
"headers": [
{
"source": "*.woff2",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000"
}
]
}
]
}
}

0 comments on commit 9b53ce0

Please sign in to comment.