IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.
TypeScript
Cache share cards at the CDN, keep the clip list fresh
Youssef4a6b23bdbe8a
diff --git a/next.config.ts b/next.config.tsindex 3c8be3d..a7402fb 100644--- a/next.config.ts+++ b/next.config.ts@@ -12,6 +12,15 @@ const nextConfig: NextConfig = {},async headers() {return [+ {+ // share cards only change on deploy: let the CDN keep them, so a viral link renders each card once+ source: "/:path(opengraph-image|twitter-image)",+ headers: [{ key: "Cache-Control", value: "public, max-age=3600, s-maxage=31536000, stale-while-revalidate=86400" }],+ },+ {+ source: "/build/:slug/:img(opengraph-image|twitter-image)",+ headers: [{ key: "Cache-Control", value: "public, max-age=3600, s-maxage=31536000, stale-while-revalidate=86400" }],+ },{// the service worker itself must never be stalesource: "/sw.js",@@ -22,6 +31,11 @@ const nextConfig: NextConfig = {source: "/voice/:path*",headers: [{ key: "Cache-Control", value: "public, max-age=604800, stale-while-revalidate=2592000" }],},+ {+ // the list of clips changes with every recording, so it is checked often+ source: "/voice/:voice/manifest.json",+ headers: [{ key: "Cache-Control", value: "public, max-age=300, stale-while-revalidate=3600" }],+ },];},async redirects() {