Files
immich-folio/next.config.ts

40 lines
1.2 KiB
TypeScript
Raw Normal View History

import type { NextConfig } from 'next';
2026-02-13 23:26:37 +01:00
// Security headers configuration
2026-02-13 23:26:37 +01:00
const nextConfig: NextConfig = {
output: 'standalone',
images: {
loader: 'custom',
loaderFile: './lib/immichLoader.ts',
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains',
},
{ key: 'X-DNS-Prefetch-Control', value: 'off' },
{
key: 'Content-Security-Policy-Report-Only',
value:
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://*.basemaps.cartocdn.com; font-src 'self'; connect-src 'self';",
},
],
},
];
},
2026-02-13 23:26:37 +01:00
};
export default nextConfig;