Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions web-demo/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
/** @type {import('next').NextConfig} */
// Keep useful security headers. CSP omitted: Next.js `next dev` (Playwright webServer)
// needs eval/HMR websockets; a strict CSP broke client hydration and e2e.
const securityHeaders = [
{ 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: "Content-Security-Policy",
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-inline'",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob:",
"font-src 'self' data:",
// BYOK narration calls OpenAI from the browser only — never a first-party API
"connect-src 'self' https://api.openai.com",
"frame-ancestors 'none'",
"object-src 'none'",
"base-uri 'self'",
"form-action 'self'",
].join("; "),
},
];

const nextConfig = {
Expand All @@ -28,4 +14,4 @@ const nextConfig = {
return [{ source: "/:path*", headers: securityHeaders }];
},
};
export default nextConfig;
export default nextConfig;
Loading