Files
ai-engineering-from-scratch/vercel.json
T
Rohit Ghumare f084492a0c fix: add Cache-Control for /glossary /catalog /path /roadmap clean URLs
Vercel headers.source matches the incoming request URL, not the
rewrite destination. The /(.*)\.html rule did not apply to the
clean URLs because incoming /glossary never sees .html in its
path. Adds an explicit rule for the four rewritten clean URLs.
2026-04-28 10:47:26 +01:00

39 lines
1.2 KiB
JSON

{
"buildCommand": "node site/build.js",
"outputDirectory": "site",
"framework": null,
"installCommand": "echo skip",
"rewrites": [
{ "source": "/glossary", "destination": "/glossary.html" },
{ "source": "/catalog", "destination": "/catalog.html" },
{ "source": "/path", "destination": "/prereqs.html" },
{ "source": "/roadmap", "destination": "/prereqs.html" }
],
"headers": [
{
"source": "/(.*)\\.(css|js|png|jpg|jpeg|svg|webp|woff2|woff|ttf|ico)",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=86400, s-maxage=604800, stale-while-revalidate=2592000" }
]
},
{
"source": "/(.*)\\.html",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=300, s-maxage=86400, stale-while-revalidate=604800" }
]
},
{
"source": "/",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=300, s-maxage=86400, stale-while-revalidate=604800" }
]
},
{
"source": "/(glossary|catalog|path|roadmap)",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=300, s-maxage=86400, stale-while-revalidate=604800" }
]
}
]
}