23 lines
603 B
TypeScript
23 lines
603 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
// CSP is set per-request in `src/proxy.ts` (nonce-based). The other headers
|
|
// are static and apply to every response, including API routes.
|
|
const securityHeaders = [
|
|
{ key: "X-Frame-Options", value: "DENY" },
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
{ key: "Referrer-Policy", value: "same-origin" },
|
|
];
|
|
|
|
const nextConfig: NextConfig = {
|
|
reactCompiler: true,
|
|
output: "standalone",
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
async headers() {
|
|
return [{ source: "/:path*", headers: securityHeaders }];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|