Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ezralazuardy committed Dec 8, 2024
1 parent 92bb470 commit ca221a0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion components/ui/landing/hero-globe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function HeroGlobe() {
src={globe}
width={880}
height={880}
loading="eager"
priority
/>
</div>
<div className="absolute h-screen w-full z-20">
Expand Down
2 changes: 1 addition & 1 deletion components/ui/landing/problem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Problem() {
<Link
href="https://luisazhou.com/blog/businesses-that-fail/"
target="_blank"
className="text-gray-200 hover:underline"
className="text-white hover:underline"
>
luisazhou.com
</Link>
Expand Down
36 changes: 34 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,44 @@ const nextConfig = {
},
async headers() {
return [
// apply cache headers for root static assets
{
source: "/(.*)",
source:
"/:file(\\.(txt|xml|json|ico|png|jpg|jpeg|svg|webp|webm|mp4|woff|woff2))$",
headers: [
{
key: "Cache-Control",
value: "public, max-age=2592000, must-revalidate", // cache for 1 month (2592000 seconds)
value: "public, max-age=2592000, immutable", // immutable cache for 1 month (2592000 seconds)
},
],
},
// apply cache headers for other static assets
{
source: "/(static|media|assets|images|videos|documents)/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=2592000, immutable", // immutable cache for 1 month (2592000 seconds)
},
],
},
// apply cache headers for next.js static assets
{
source: "/_next/static/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=2592000, immutable", // immutable cache for 1 month (2592000 seconds)
},
],
},
// apply cache headers for vercel insights static assets
{
source: "/_vercel/insights/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=2592000, immutable", // immutable cache for 1 month (2592000 seconds)
},
],
},
Expand Down

0 comments on commit ca221a0

Please sign in to comment.