-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
30 lines (28 loc) · 784 Bytes
/
next.config.ts
File metadata and controls
30 lines (28 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async headers() {
return [
{
// Apply iframe-friendly headers to all routes
source: '/(.*)',
headers: [
// Note: We intentionally omit X-Frame-Options to allow iframe embedding
// Instead, we use CSP frame-ancestors for more modern control
{
key: 'Content-Security-Policy',
value: "frame-ancestors *;", // Allow embedding from any origin
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
],
},
];
},
};
export default nextConfig;