fix: add Cache-Control no-cache for HTML pages to prevent stale CDN content #41

Merged
uz1mani merged 5 commits from staging into main 2026-03-07 21:04:22 +00:00
9 changed files with 119 additions and 63 deletions
Showing only changes of commit 2f5bcf479a - Show all commits

View File

@@ -47,6 +47,14 @@ const nextConfig: NextConfig = {
},
async headers() {
return [
{
// * Prevent CDN/browser from serving stale HTML after deploys.
// * Static assets (/_next/static/*) are content-hashed and cached separately by Next.js.
source: '/((?!_next/static|_next/image).*)',
headers: [
{ key: 'Cache-Control', value: 'no-cache, must-revalidate' },
],
},
{
source: '/(.*)',
headers: [