2026-06-25 19:47:57 +02:00
|
|
|
import type { NextConfig } from 'next';
|
|
|
|
|
|
2026-07-19 15:35:18 +02:00
|
|
|
const csp = [
|
|
|
|
|
"default-src 'self'",
|
|
|
|
|
"script-src 'self' 'unsafe-eval' 'unsafe-inline'", // nodig voor Next.js
|
|
|
|
|
"style-src 'self' 'unsafe-inline'",
|
|
|
|
|
"img-src 'self' data: blob: https://ipfs.maos.dedyn.io https://*.maos.dedyn.io",
|
|
|
|
|
"media-src 'self' https://ipfs.maos.dedyn.io https://*.maos.dedyn.io",
|
|
|
|
|
"connect-src 'self' ws: wss: ${process.env.NEXT_PUBLIC_ZKSYNC_RPC_URL || 'http://localhost:3050'}",
|
|
|
|
|
"frame-src 'self'",
|
|
|
|
|
"base-uri 'self'",
|
|
|
|
|
"form-action 'self'",
|
|
|
|
|
].join('; ');
|
|
|
|
|
|
2026-06-25 19:47:57 +02:00
|
|
|
const nextConfig: NextConfig = {
|
|
|
|
|
images: { unoptimized: true },
|
|
|
|
|
output: process.env.DOCKER_BUILD ? 'standalone' : undefined,
|
2026-07-19 15:35:18 +02:00
|
|
|
async headers() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: '/(.*)',
|
|
|
|
|
headers: [
|
|
|
|
|
{ key: 'Content-Security-Policy', value: csp },
|
|
|
|
|
{ key: 'X-Content-Type-Options', value: 'nosniff' },
|
|
|
|
|
{ key: 'X-Frame-Options', value: 'DENY' },
|
|
|
|
|
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
2026-06-25 19:47:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default nextConfig;
|