's'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user