v0.11.1: 权限体系重构 + AI管线优化 + 内容整理

This commit is contained in:
sgp
2026-05-22 18:36:41 +08:00
parent 7955d11c52
commit b33fe1e8e1
397 changed files with 30940 additions and 161 deletions
+75 -1
View File
@@ -1,4 +1,78 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
minimumCacheTTL: 3600,
formats: ["image/avif", "image/webp"],
},
compress: true,
poweredByHeader: false,
reactStrictMode: true,
webpack: (config, { isServer }) => {
config.watchOptions = {
...config.watchOptions,
ignored: [
"**/node_modules/**",
"**/.git/**",
"**/System Volume Information/**",
"**/DumpStack.log.tmp",
"**/pagefile.sys",
],
poll: false,
};
return config;
},
onDemandEntries: {
maxInactiveAge: 60 * 1000,
pagesBufferLength: 5,
},
experimental: {
optimizeCss: false,
},
headers: async () => {
const isDev = process.env.NODE_ENV === "development";
const headers = [
{
source: "/api/:path*",
headers: [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "X-XSS-Protection", value: "1; mode=block" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
],
},
{
source: "/logos/:path*",
headers: [
{ key: "Cache-Control", value: isDev ? "no-cache" : "public, max-age=86400, immutable" },
],
},
];
if (isDev) {
headers.push({
source: "/(.*)",
headers: [
{ key: "Cache-Control", value: "no-store, no-cache, must-revalidate, proxy-revalidate" },
],
});
} else {
headers.push({
source: "/_next/static/:path*",
headers: [
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
],
});
}
return headers;
},
};
export default nextConfig;