Files
buzz-sheet/next.config.ts
T
gunshiz 9555e0a884
CI / Verify (push) Successful in 2m50s
CI / Build immutable images and deploy (push) Successful in 2m49s
feat update
2026-10-03 01:36:56 +07:00

43 lines
1.3 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") }];
},
async rewrites() {
// The reset-password segment resolves to the dynamic guide route in this Next version.
return { beforeFiles: [{ source: "/reset-password", destination: "/password-reset" }] };
},
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: {
serverActions: {
bodySizeLimit: "5mb",
},
},
turbopack: {
root: process.cwd(),
},
};
export default nextConfig;