Skip to content

Commit 9829327

Browse files
committed
enable in iframes
1 parent cd93a50 commit 9829327

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

next.config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
// output: 'export',
4+
async headers() {
5+
return [
6+
{
7+
// Apply to all routes
8+
source: '/(.*)',
9+
headers: [
10+
{
11+
key: 'Content-Security-Policy',
12+
// Explicitly allow embedding the site in iframes anywhere
13+
// Note: If your hosting/platform also sets a CSP with a more restrictive
14+
// frame-ancestors (e.g., 'none'), browsers will combine policies and the
15+
// most restrictive wins. Remove or relax upstream CSP/X-Frame-Options there.
16+
value: 'frame-ancestors *;',
17+
},
18+
],
19+
},
20+
];
21+
},
522
};
623

724
export default nextConfig;

0 commit comments

Comments
 (0)