Files
immich-redaktions-plugin/next.config.ts
T

55 lines
1.5 KiB
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
poweredByHeader: false,
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Content-Security-Policy",
// ponytail: restrictive CSP — 'unsafe-inline' for styles only
// because Next.js injects inline styles. No unsafe-inline for
// scripts. Upgrade path: nonces once Next supports them per-route.
value: [
"default-src 'self'",
"script-src 'self'",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data:",
"font-src 'self'",
"connect-src 'self'",
"frame-ancestors 'none'",
"base-uri 'self'",
"form-action 'self'",
].join("; "),
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "Permissions-Policy",
value: [
"camera=()",
"microphone=()",
"geolocation=()",
"interest-cohort=()",
].join(", "),
},
],
},
];
},
};
export default nextConfig;