diff --git a/next.config.ts b/next.config.ts index e0dc503..87d3562 100644 --- a/next.config.ts +++ b/next.config.ts @@ -5,6 +5,20 @@ const nextConfig: NextConfig = { // native .node binaries, not its JS loader, causing a segfault in // production. Deploying with the full node_modules via `next start` is // simple enough for a single-VM deployment. + + async headers() { + return [ + { + // Every page is personalized (session, wallet balance, owned + // games) — an intermediate proxy (nginx, a CDN) has no business + // caching any of it. Static assets under /_next/static are + // content-hashed by the build and are explicitly excluded here so + // they keep their own long-lived caching. + source: "/((?!_next/static).*)", + headers: [{ key: "Cache-Control", value: "no-store" }], + }, + ]; + }, }; export default nextConfig;