Files
gunshiz 9580407a90
CI / Verify (push) Successful in 1m56s
CI / Build immutable images and deploy (push) Successful in 3m12s
perf : cache
2026-10-08 23:21:34 +07:00

40 lines
1.1 KiB
TypeScript

import type { NextConfig } from "next";
import { resolve } from "node:path";
import { securityHeaders } from "./lib/security/headers";
const nextConfig: NextConfig = {
poweredByHeader: false,
async headers() {
return [{ source: "/:path*", headers: securityHeaders(process.env.NODE_ENV === "production", "https://cdn.jsdelivr.net") }];
},
cacheComponents: true,
cacheHandlers: {
remote: resolve(process.cwd(), "cache-handlers/redis-handler.cjs"),
},
deploymentId: process.env.NEXT_DEPLOYMENT_ID,
typescript: {
// TypeScript is checked in CI before the production image is built.
ignoreBuildErrors: true,
},
allowedDevOrigins: ["astral"],
output: "standalone",
images: {
qualities: [75, 100],
remotePatterns: [
{ protocol: "https", hostname: "buzz-cdn.astrxl.dev", pathname: "/**" },
{ protocol: "https", hostname: "api.lunaris.moe", pathname: "/data/assets/icons/**" },
],
},
experimental: {
turbopackFileSystemCacheForDev: true,
serverActions: {
bodySizeLimit: "5mb",
},
},
turbopack: {
root: process.cwd(),
},
};
export default nextConfig;