Files
IPFS-portal/next.config.ts
T
maikrolf 7c7854e08f feat: SIWE auth, auto-pin, pin search/share, explorer improvements
- SIWE server-side auth (siwe + jose JWT)
- Wallet provider fallback (MAOS -> MetaMask)
- Auto-pin after upload (quick + crypto)
- Pin search/filter in explorer
- Share button (gateway link) per pin
- Copy CID button per pin
- Breadcrumb root navigation fix
- Hydration mismatch fix (mounted state)
- Defensive truncateCid for empty values
- CSP fix (template literal)
- Error boundaries (upload, profile, usage)
- 191 tests passing
2026-09-19 12:25:36 +02:00

37 lines
1.1 KiB
TypeScript

import type { NextConfig } from 'next';
// Haal de RPC URL op uit environment variabelen
const zkSyncRpcUrl = process.env.NEXT_PUBLIC_ZKSYNC_RPC_URL || 'http://localhost:3050';
const csp = [
"default-src 'self'",
"script-src 'self' 'unsafe-eval' 'unsafe-inline'",
"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: ${zkSyncRpcUrl}`,
"frame-src 'self'",
"base-uri 'self'",
"form-action 'self'",
].join('; ');
const nextConfig: NextConfig = {
images: { unoptimized: true },
output: process.env.DOCKER_BUILD ? 'standalone' : undefined,
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' },
],
},
];
},
};
export default nextConfig;