Files
lotteryFront/next.config.ts
kang a86e8a2c67
Some checks failed
lotteryfront CI / build (push) Has been cancelled
chore(deploy): 完善 lotteryfront 单机部署流程
2026-07-07 15:32:03 +08:00

30 lines
702 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { NextConfig } from "next";
import { nonCspSecurityHeaders } from "./src/lib/csp-config";
import { parseAllowedDevOrigins } from "./src/lib/next-dev-origins";
const allowedDevOrigins = parseAllowedDevOrigins(process.env.ALLOWED_DEV_ORIGINS);
const nextConfig: NextConfig = {
output: "standalone",
allowedDevOrigins,
reactCompiler: true,
images: {
unoptimized: true,
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
},
// 非 CSP 安全头CSP 由 middleware 按后台接入站点白名单动态生成。
async headers() {
return [
{
source: "/:path*",
headers: nonCspSecurityHeaders,
},
];
},
};
export default nextConfig;