This commit is contained in:
eric
2026-03-08 10:27:28 -05:00
parent 7af7651104
commit d6c5135d97
3 changed files with 40 additions and 0 deletions

View File

@@ -4,6 +4,24 @@ const nextConfig: NextConfig = {
experimental: {
serverActions: { bodySizeLimit: "25mb" },
},
async headers() {
const noCacheHeaders = [
{
key: "Cache-Control",
value: "no-store, no-cache, must-revalidate, proxy-revalidate",
},
{ key: "Pragma", value: "no-cache" },
{ key: "Expires", value: "0" },
];
return [
{ source: "/", headers: noCacheHeaders },
{
// 排除 /_next/ 静态资源(含 hash 可长期缓存),其余页面禁用缓存
source: "/:path((?!_next).*)",
headers: noCacheHeaders,
},
];
},
};
export default nextConfig;